1 """Adds description and code example to block type
2
3 Revision ID: 84892301571a
4 Revises: f65b6ad0b869
5 Create Date: 2022-06-08 12:17:02.928460
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 = "84892301571a" 1 ctx 1a
14 down_revision = "f65b6ad0b869" 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" ) as batch_op : 1 ctx 1a
22 batch_op . add_column ( sa . Column ( "description" , sa . String ( ) , nullable = True ) ) 1 ctx 1a
23 batch_op . add_column ( sa . Column ( "code_example" , sa . String ( ) , nullable = True ) ) 1 ctx 1a
24 # ### end Alembic commands ###
25
26
27 def downgrade ( ) : 1 ctx 1a
28 # ### commands auto generated by Alembic - please adjust! ###
29 with op . batch_alter_table ( "block_type" ) as batch_op :
30 batch_op . drop_column ( "code_example" )
31 batch_op . drop_column ( "description" )
32 # ### end Alembic commands ###