Update Template.version and TemplateHistory.version nullable=False to match the db

This commit is contained in:
Rebecca Law
2016-10-04 10:47:34 +01:00
parent 81a390f9c3
commit 6f83258004
2 changed files with 2 additions and 8 deletions

View File

@@ -25,9 +25,6 @@ def upgrade():
op.alter_column('services_history', 'research_mode',
existing_type=sa.BOOLEAN(),
nullable=False)
op.alter_column('templates', 'version',
existing_type=sa.INTEGER(),
nullable=True)
op.create_foreign_key('templates_history_service_id_fkey', 'templates_history', 'services', ['service_id'], ['id'])
op.create_foreign_key('templates_history_created_by_id_fkey', 'templates_history', 'users', ['created_by_id'], ['id'])
### end Alembic commands ###
@@ -37,9 +34,6 @@ def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('templates_history_service_id_fkey', 'templates_history', type_='foreignkey')
op.drop_constraint('templates_history_created_by_id_fkey', 'templates_history', type_='foreignkey')
op.alter_column('templates', 'version',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('services_history', 'research_mode',
existing_type=sa.BOOLEAN(),
nullable=True)