feat: add map image site module
This commit is contained in:
28
alembic/versions/0002_add_map_image.py
Normal file
28
alembic/versions/0002_add_map_image.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Add map image module table.
|
||||
|
||||
Revision ID: 0002_add_map_image
|
||||
Revises: 0001_initial_schema
|
||||
Create Date: 2026-07-01
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
from sqlalchemy import inspect
|
||||
from app.models import MapImage
|
||||
|
||||
|
||||
revision = "0002_add_map_image"
|
||||
down_revision = "0001_initial_schema"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
bind = op.get_bind()
|
||||
if "MapImage" not in set(inspect(bind).get_table_names()):
|
||||
MapImage.__table__.create(bind)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
bind = op.get_bind()
|
||||
if "MapImage" in set(inspect(bind).get_table_names()):
|
||||
MapImage.__table__.drop(bind)
|
||||
Reference in New Issue
Block a user