forked from mtusi2026/mtusi2026lab5
feat: add variants jsonb migration
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""add variants to attachments
|
||||
|
||||
Revision ID: d15635c49e1a
|
||||
Revises: 133990c80d19
|
||||
Create Date: 2026-11-11 21:38:16.802941
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'd15635c49e1a'
|
||||
down_revision: Union[str, None] = '133990c80d19'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('attachments', sa.Column('variants', postgresql.JSONB(astext_type=sa.Text()), nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('attachments', 'variants')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user