mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-05 12:28:22 +00:00
chore: recreate model_metadata migration
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
"""add model_metadata to model_paths
|
||||||
|
|
||||||
|
Revision ID: a3f1b6c204de
|
||||||
|
Revises: e5a6b7c8d9f0
|
||||||
|
Create Date: 2026-09-15 21:50:00.000000
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from alembic import op
|
||||||
|
|
||||||
|
revision = "a3f1b6c204de"
|
||||||
|
down_revision = "e5a6b7c8d9f0"
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade() -> None:
|
||||||
|
op.add_column(
|
||||||
|
"model_paths",
|
||||||
|
sa.Column("model_metadata", sa.Text(), nullable=False, server_default="{}"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade() -> None:
|
||||||
|
op.drop_column("model_paths", "model_metadata")
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
"""add model metadata to model paths
|
|
||||||
|
|
||||||
Revision ID: d4597091cd76
|
|
||||||
Revises: e5a6b7c8d9f0
|
|
||||||
Create Date: 2026-09-07 22:17:55.426282
|
|
||||||
"""
|
|
||||||
|
|
||||||
import sqlalchemy as sa
|
|
||||||
from alembic import op
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = "d4597091cd76"
|
|
||||||
down_revision = "e5a6b7c8d9f0"
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
|
||||||
op.add_column(
|
|
||||||
"model_paths",
|
|
||||||
sa.Column(
|
|
||||||
"model_metadata",
|
|
||||||
sa.Text(),
|
|
||||||
nullable=False,
|
|
||||||
server_default="{}",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
|
||||||
op.drop_column("model_paths", "model_metadata")
|
|
||||||
Reference in New Issue
Block a user