diff options
author | Jessica Tallon <jessica@megworld.co.uk> | 2015-04-28 20:43:15 +0200 |
---|---|---|
committer | Jessica Tallon <jessica@megworld.co.uk> | 2015-05-26 16:48:59 +0200 |
commit | e8b44d7c093ce24c2c77674a389238efc4d58f60 (patch) | |
tree | 20c484eaebaaebeb06e4d123a2a7477b2e2e68ea /mediagoblin/db/migrations.py | |
parent | 6185a4b9e6465ecd9c4806ffeec7688f7baa1f2f (diff) | |
download | mediagoblin-e8b44d7c093ce24c2c77674a389238efc4d58f60.tar.lz mediagoblin-e8b44d7c093ce24c2c77674a389238efc4d58f60.tar.xz mediagoblin-e8b44d7c093ce24c2c77674a389238efc4d58f60.zip |
Add migration to remove ActivityIntermediator
Migration to drop the table and removal of it from the model as it has
now been superseeded by the GenericForeignKey field.
Diffstat (limited to 'mediagoblin/db/migrations.py')
-rw-r--r-- | mediagoblin/db/migrations.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index 8661c95a..70bf6234 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -1398,8 +1398,17 @@ def rename_and_remove_object_and_target(db): # Commit the changes to the database. db.commit() +@RegisterMigration(31, MIGRATIONS) +def remove_activityintermediator(db): + """ + This removes the old specific ActivityIntermediator model which has been + superseeded by the GenericForeignKey field. + """ + metadata = MetaData(bind=db.bind) + # Drop the table + ai_table = inspect_table(metadata, "core__activity_intermediators") + ai_table.drop() - - - + # Commit the changes + db.commit() |