Coverage for /usr/local/lib/python3.12/site-packages/prefect/server/database/_migrations/versions/sqlite/2022_06_08_121702_84892301571a_adds_description_and_code_example_to_.py: 79%

14 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 11:21 +0000

1"""Adds description and code example to block type 

2 

3Revision ID: 84892301571a 

4Revises: f65b6ad0b869 

5Create Date: 2022-06-08 12:17:02.928460 

6 

7""" 

8 

9import sqlalchemy as sa 1a

10from alembic import op 1a

11 

12# revision identifiers, used by Alembic. 

13revision = "84892301571a" 1a

14down_revision = "f65b6ad0b869" 1a

15branch_labels = None 1a

16depends_on = None 1a

17 

18 

19def upgrade(): 1a

20 # ### commands auto generated by Alembic - please adjust! ### 

21 with op.batch_alter_table("block_type") as batch_op: 1a

22 batch_op.add_column(sa.Column("description", sa.String(), nullable=True)) 1a

23 batch_op.add_column(sa.Column("code_example", sa.String(), nullable=True)) 1a

24 # ### end Alembic commands ### 

25 

26 

27def downgrade(): 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 ###