Opened 10 years ago

Closed 10 years ago

#982 closed defect (fixed)

Database migrations no longer work

Reported by: Jessica Tallon Owned by:
Priority: critical Milestone: 0.8.0
Component: programming Keywords: migration, database
Cc: Parent Tickets:


Since the python 3 merge, database migrations no longer work. To produce the error you should run ./devtools/ on the latest master (as of writing this it's 1a2982d) to produce a un-migrated database. Then do ./bin/gmg dbupdate you will find an error will occur:

-> Updating main mediagoblin tables:
   + Running migration 19, "drop_MediaEntry_collected"... Traceback (most recent call last):
  File "./bin/gmg", line 9, in <module>
    load_entry_point('', 'console_scripts', 'gmg')()
  File "/Users/jessica/Documents/Workspace/mediagoblin/mediagoblin/gmg_commands/", line 130, in main_cli
  File "/Users/jessica/Documents/Workspace/mediagoblin/mediagoblin/gmg_commands/", line 160, in dbupdate
    run_dbupdate(app_config, global_config)
  File "/Users/jessica/Documents/Workspace/mediagoblin/mediagoblin/gmg_commands/", line 128, in run_dbupdate
    run_all_migrations(db, app_config, global_config)
  File "/Users/jessica/Documents/Workspace/mediagoblin/mediagoblin/gmg_commands/", line 155, in run_all_migrations
  File "/Users/jessica/Documents/Workspace/mediagoblin/mediagoblin/db/", line 286, in init_or_migrate
  File "/Users/jessica/Documents/Workspace/mediagoblin/mediagoblin/db/", line 724, in drop_MediaEntry_collected
  File "build/bdist.macosx-10.9-x86_64/egg/sqlalchemy/sql/", line 2855, in __getattr__
AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'drop'

The version of SQLAlchemy that I'm using is: 0.8.7

Change History (1)

comment:1 by Christopher Allan Webber, 10 years ago

Milestone: 0.8.0
Resolution: fixed
Status: newclosed

Should be fixed now in git master!

Note: See TracTickets for help on using tickets.