42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
"""init
|
|
|
|
Revision ID: a3ac646e53a8
|
|
Revises:
|
|
Create Date: 2025-06-04 21:36:22.283823
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = 'a3ac646e53a8'
|
|
down_revision: Union[str, None] = None
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Upgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_index(op.f('ix_items_id'), table_name='items')
|
|
op.drop_index(op.f('ix_items_name'), table_name='items')
|
|
op.drop_table('items')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Downgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('items',
|
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
|
sa.Column('name', sa.VARCHAR(), autoincrement=False, nullable=True),
|
|
sa.Column('description', sa.VARCHAR(), autoincrement=False, nullable=True),
|
|
sa.PrimaryKeyConstraint('id', name=op.f('items_pkey'))
|
|
)
|
|
op.create_index(op.f('ix_items_name'), 'items', ['name'], unique=False)
|
|
op.create_index(op.f('ix_items_id'), 'items', ['id'], unique=False)
|
|
# ### end Alembic commands ###
|