Prvni pokus o verejny pristup, sprava profilu

This commit is contained in:
Michal Kváček
2023-08-09 00:27:27 +02:00
parent ca500472e3
commit 57afde90c3
15 changed files with 814 additions and 124 deletions
@@ -0,0 +1,32 @@
"""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 ###