1 """Add protected column for block types
2
3 Revision ID: dff8da7a6c2c
4 Revises: 9e2a1c08c6f1
5 Create Date: 2022-06-20 12:38:23.657760
6
7 """
8
9 import sqlalchemy as sa 1 ctx 1a
10 from alembic import op 1 ctx 1a
11
12 # revision identifiers, used by Alembic.
13 revision = "dff8da7a6c2c" 1 ctx 1a
14 down_revision = "a205b458d997" 1 ctx 1a
15 branch_labels = None 1 ctx 1a
16 depends_on = None 1 ctx 1a
17
18
19 def upgrade ( ) : 1 ctx 1a
20 # ### commands auto generated by Alembic - please adjust! ###
21 with op . batch_alter_table ( "block_type" , schema = None ) as batch_op : 1 ctx 1a
22 batch_op . add_column ( 1 ctx 1a
23 sa . Column ( "is_protected" , sa . Boolean ( ) , server_default = "0" , nullable = False )
24 )
25 # ### end Alembic commands ###
26
27
28 def downgrade ( ) : 1 ctx 1a
29 # ### commands auto generated by Alembic - please adjust! ###
30 with op . batch_alter_table ( "block_type" , schema = None ) as batch_op :
31 batch_op . drop_column ( "is_protected" )
32 # ### end Alembic commands ###