feat: add map image site module

This commit is contained in:
duanshuwen
2026-07-02 08:57:49 +08:00
parent a47b4b5dd0
commit 7b329907f9
5 changed files with 221 additions and 8 deletions

View 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)