28 lines
762 B
Python
28 lines
762 B
Python
"""0009 object city and client fields
|
|
|
|
Revision ID: 0009
|
|
Revises: 0008
|
|
Create Date: 2026-04-07
|
|
"""
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
revision = "0009"
|
|
down_revision = "0008"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column("objects", sa.Column("city", sa.String(100), nullable=True))
|
|
op.add_column("objects", sa.Column("client", sa.String(255), nullable=True))
|
|
op.create_index("ix_objects_city", "objects", ["city"])
|
|
op.create_index("ix_objects_client", "objects", ["client"])
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index("ix_objects_client", table_name="objects")
|
|
op.drop_index("ix_objects_city", table_name="objects")
|
|
op.drop_column("objects", "client")
|
|
op.drop_column("objects", "city")
|