diff options
Diffstat (limited to 'docs/tutorials/wiki2/src/basiclayout')
| -rw-r--r-- | docs/tutorials/wiki2/src/basiclayout/tutorial/alembic/versions/20240204_4b6614165904.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/tutorials/wiki2/src/basiclayout/tutorial/alembic/versions/20240204_4b6614165904.py b/docs/tutorials/wiki2/src/basiclayout/tutorial/alembic/versions/20240204_4b6614165904.py new file mode 100644 index 000000000..4f7a97d30 --- /dev/null +++ b/docs/tutorials/wiki2/src/basiclayout/tutorial/alembic/versions/20240204_4b6614165904.py @@ -0,0 +1,33 @@ +"""init + +Revision ID: 4b6614165904 +Revises: +Create Date: 2024-02-04 14:32:46.784813 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '4b6614165904' +down_revision = None +branch_labels = None +depends_on = None + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('models', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('name', sa.String(), nullable=True), + sa.Column('value', sa.Integer(), nullable=True), + sa.PrimaryKeyConstraint('id', name=op.f('pk_models')) + ) + op.create_index('my_index', 'models', ['name'], unique=True, mysql_length=255) + # ### end Alembic commands ### + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_index('my_index', table_name='models', mysql_length=255) + op.drop_table('models') + # ### end Alembic commands ### |
