51dfa236bcf1_add_superuser.py 504 B

12345678910111213141516171819202122232425262728
  1. """add superuser
  2. Revision ID: 51dfa236bcf1
  3. Revises: 1baf7a0c6aab
  4. Create Date: 2021-12-13 23:00:51.552018
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '51dfa236bcf1'
  10. down_revision = '1baf7a0c6aab'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. op.add_column(
  15. 'users', sa.Column('is_superuser', sa.Boolean(), default=False, nullable=False)
  16. )
  17. def downgrade():
  18. op.drop_column(
  19. 'users', 'is_superuser'
  20. )