Skip to content

Commit

Permalink
Fix initialize user status migration file (#2103)
Browse files Browse the repository at this point in the history
* fix migration file

* fix migration, change None to Null
  • Loading branch information
jadmsaadaot authored Aug 29, 2023
1 parent 408a760 commit 72a83ce
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute("UPDATE staff_users SET status_id = 1")
op.alter_column('survey', 'is_template', nullable=False, server_default='1')
op.alter_column('staff_users', 'status_id', nullable=False, server_default='1')
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('survey', 'is_template', nullable=True, server_default=None)
op.execute("UPDATE staff_users SET status_id = None")
op.alter_column('staff_users', 'status_id', nullable=True, server_default=None)
op.execute("UPDATE staff_users SET status_id = NULL")
# ### end Alembic commands ###

0 comments on commit 72a83ce

Please sign in to comment.