33 lines
942 B
Python
33 lines
942 B
Python
"""add public info to user
|
|
|
|
Revision ID: 707eb800ddcd
|
|
Revises: 3d51075b5ece
|
|
Create Date: 2023-08-08 20:24:32.728653
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '707eb800ddcd'
|
|
down_revision = '3d51075b5ece'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('user', sa.Column('description', sa.Text(), nullable=False))
|
|
op.add_column('user', sa.Column('public_username', sa.String(length=128), nullable=True))
|
|
op.create_unique_constraint(None, 'user', ['public_username'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(None, 'user', type_='unique')
|
|
op.drop_column('user', 'public_username')
|
|
op.drop_column('user', 'description')
|
|
# ### end Alembic commands ###
|