Change account-less logs to use a user and not null

This allows us to skip the migration
This commit is contained in:
Joseph Schorr 2016-04-26 15:16:55 -04:00 committed by Jimmy Zelinskie
parent 5cb6ba4d12
commit 4f63a50a17
6 changed files with 39 additions and 21 deletions

View file

@ -65,8 +65,6 @@ def upgrade(tables):
op.add_column(u'notification', sa.Column('lookup_path', sa.String(length=255), nullable=True))
op.create_index('notification_lookup_path', 'notification', ['lookup_path'], unique=False)
op.drop_constraint(u'fk_logentry_user_account_id', 'logentry', type_='foreignkey')
op.alter_column('logentry', 'account_id', existing_type=sa.Integer(), nullable=True)
def downgrade(tables):
@ -80,6 +78,3 @@ def downgrade(tables):
op.drop_column(u'notification', 'lookup_path')
op.drop_table('servicekey')
op.drop_table('servicekeyapproval')
op.alter_column('logentry', 'account_id', existing_type=sa.Integer(), nullable=False)
op.create_foreign_key(u'fk_logentry_user_account_id', 'logentry', 'user', ['account_id'], ['id'])