diff --git a/migrations/versions/d15635c49e1a_add_variants_to_attachments.py b/migrations/versions/d15635c49e1a_add_variants_to_attachments.py new file mode 100644 index 0000000..eebb879 --- /dev/null +++ b/migrations/versions/d15635c49e1a_add_variants_to_attachments.py @@ -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 ###