45 lines
1.6 KiB
Python
45 lines
1.6 KiB
Python
"""add_social_handles
|
|
|
|
Revision ID: 409112776ded
|
|
Revises: b1ca95289d88
|
|
Create Date: 2025-12-29 20:46:30.443972
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
import sqlmodel.sql.sqltypes
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '409112776ded'
|
|
down_revision: Union[str, Sequence[str], None] = 'b1ca95289d88'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Upgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('bluesky_handle', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
|
|
batch_op.add_column(sa.Column('mastodon_handle', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
|
|
batch_op.add_column(sa.Column('instagram_handle', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
|
|
batch_op.add_column(sa.Column('x_handle', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
|
|
batch_op.add_column(sa.Column('location', sqlmodel.sql.sqltypes.AutoString(), nullable=True))
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Downgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
batch_op.drop_column('location')
|
|
batch_op.drop_column('x_handle')
|
|
batch_op.drop_column('instagram_handle')
|
|
batch_op.drop_column('mastodon_handle')
|
|
batch_op.drop_column('bluesky_handle')
|
|
|
|
# ### end Alembic commands ###
|