mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Fix migration script for existing jobs
This commit is contained in:
@@ -16,7 +16,10 @@ import sqlalchemy as sa
|
||||
|
||||
def upgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('jobs', sa.Column('notification_count', sa.Integer(), nullable=False))
|
||||
op.add_column('jobs', sa.Column('notification_count', sa.Integer(), nullable=True))
|
||||
op.get_bind()
|
||||
op.execute('update jobs set notification_count = 0')
|
||||
op.alter_column('jobs', 'notification_count', nullable=False)
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user