migrating from [Trac 1.0] to [Trac 1.4] TracError: OperationalError: no such column: description

134 Views Asked by At

as explained in the tile, I'm trying to migrate from Trac 1.0.11 to 1.4.2 (with SQLite backends) but get an error while performing "trac-admin [path] upgrade" command on.

TracError: OperationalError: no such column: description

I have no idea where this description column can be and what it can be related to. Does anybody has any clue of what's going on, please? NB: I actually migrated 2 workspaces and only on is failing; the only functional difference is that the failing one uses MultipleWorkflowPlugin, and the other one is not.

Here are the log traces for that issue:

2021-01-18 16:21:53,200 Trac[env] ERROR: Exception caught while checking for upgrade: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/env.py", line 868, in open_environment
    needs_upgrade = env.needs_upgrade()
  File "/usr/lib/python2.7/site-packages/trac/env.py", line 747, in needs_upgrade
    for participant in self.setup_participants:
  File "/usr/lib/python2.7/site-packages/trac/core.py", line 95, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "/usr/lib/python2.7/site-packages/trac/core.py", line 238, in __getitem__
    component = cls(self)
  File "/usr/lib/python2.7/site-packages/trac/core.py", line 157, in __call__
    self.__init__()
  File "build/bdist.linux-x86_64/egg/multipleworkflow/workflow.py", line 113, in __init__
    for t in self._ticket_types + ['default']:
  File "build/bdist.linux-x86_64/egg/multipleworkflow/workflow.py", line 122, in _ticket_types
    return [enum.name for enum in model.Type.select(self.env)]
  File "/usr/lib/python2.7/site-packages/trac/ticket/model.py", line 878, in select
    (cls.type,)):
  File "/usr/lib/python2.7/site-packages/trac/db/util.py", line 129, in execute
    cursor.execute(query, params if params is not None else [])
  File "/usr/lib/python2.7/site-packages/trac/db/util.py", line 62, in execute
    r = self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.7/site-packages/trac/db/sqlite_backend.py", line 87, in execute
    result = PyFormatCursor.execute(self, *args)
  File "/usr/lib/python2.7/site-packages/trac/db/sqlite_backend.py", line 63, in execute
    args or [])
  File "/usr/lib/python2.7/site-packages/trac/db/sqlite_backend.py", line 54, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: no such column: description

PS: same issue for databases previously migrated to 1.0.13 version.

Thanks for any help.

2

There are 2 best solutions below

0
Thomas Escolan On BEST ANSWER

Source code from the plugin has been fixed last week. Thx https://trac-hacks.org/ticket/13943

0
RjOllos On

This is some behavior that I haven't seen before, but I think it makes sense.

Workaround:

  1. Disable MultipleWorkflowPlugin
  2. run upgrade
  3. Enable MultipleWorkflowPlugin.

The components are loaded when opening the environment on the execution of upgrade. When the MultipleWorkflowPlugin component is initialized it attempts to fetch all of the enums, which executes SQL that queries the description column. The description column doesn't exist until upgrade finishes, so an error results.

Edit: This issue should be fixed in the latest version of MultipleWorkflowPlugin, see #13943.