diff options
Diffstat (limited to 'migrations/versions/afd561b2a827_add_admin_field.py')
-rw-r--r-- | migrations/versions/afd561b2a827_add_admin_field.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/migrations/versions/afd561b2a827_add_admin_field.py b/migrations/versions/afd561b2a827_add_admin_field.py new file mode 100644 index 0000000..da3552a --- /dev/null +++ b/migrations/versions/afd561b2a827_add_admin_field.py @@ -0,0 +1,28 @@ +"""add admin field + +Revision ID: afd561b2a827 +Revises: bc8f89f077d8 +Create Date: 2022-09-21 16:10:37.422259 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'afd561b2a827' +down_revision = 'bc8f89f077d8' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('user', sa.Column('is_admin', sa.Boolean(), nullable=False, server_default=str(False))) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('user', 'is_admin') + # ### end Alembic commands ### |