|
@@ -22,26 +22,10 @@ def upgrade():
|
|
|
sa.ForeignKeyConstraint(['forum_id'], ['forums.id'], name='fk_forum_id', use_alter=True),
|
|
|
sa.ForeignKeyConstraint(['group_id'], ['groups.id'], )
|
|
|
)
|
|
|
- op.create_foreign_key('fk_fr_forum_id', 'forumsread', 'forums', ['forum_id'], ['id'])
|
|
|
- op.create_foreign_key('fk_forum_id', 'moderators', 'forums', ['forum_id'], ['id'])
|
|
|
- op.create_foreign_key('fk_post_topic_id', 'posts', 'topics', ['topic_id'], ['id'])
|
|
|
- op.create_foreign_key('fk_settingsgroup', 'settings', 'settingsgroup', ['settingsgroup'], ['key'])
|
|
|
- op.create_foreign_key('fk_topic_forum_id', 'topics', 'forums', ['forum_id'], ['id'])
|
|
|
- op.create_foreign_key('fk_tr_topic_id', 'topicsread', 'topics', ['topic_id'], ['id'])
|
|
|
- op.create_foreign_key('fk_tr_forum_id', 'topicsread', 'forums', ['forum_id'], ['id'])
|
|
|
- op.create_foreign_key('fk_tracker_topic_id', 'topictracker', 'topics', ['topic_id'], ['id'])
|
|
|
### end Alembic commands ###
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
|
- op.drop_constraint('fk_tracker_topic_id', 'topictracker', type_='foreignkey')
|
|
|
- op.drop_constraint('fk_tr_forum_id', 'topicsread', type_='foreignkey')
|
|
|
- op.drop_constraint('fk_tr_topic_id', 'topicsread', type_='foreignkey')
|
|
|
- op.drop_constraint('fk_topic_forum_id', 'topics', type_='foreignkey')
|
|
|
- op.drop_constraint('fk_settingsgroup', 'settings', type_='foreignkey')
|
|
|
- op.drop_constraint('fk_post_topic_id', 'posts', type_='foreignkey')
|
|
|
- op.drop_constraint('fk_forum_id', 'moderators', type_='foreignkey')
|
|
|
- op.drop_constraint('fk_fr_forum_id', 'forumsread', type_='foreignkey')
|
|
|
op.drop_table('forumgroups')
|
|
|
### end Alembic commands ###
|