34 lines
898 B
Python
34 lines
898 B
Python
"""add avatar fields
|
|
|
|
Revision ID: c1f8d92b4e31
|
|
Revises: a91b7c4d2f10
|
|
Create Date: 2026-04-21 12:20:00.000000
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision = "c1f8d92b4e31"
|
|
down_revision = "a91b7c4d2f10"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
with op.batch_alter_table("user", schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column("avatar_url", sa.String(length=255), nullable=True))
|
|
|
|
with op.batch_alter_table("cost_participant", schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column("avatar_url", sa.String(length=255), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table("cost_participant", schema=None) as batch_op:
|
|
batch_op.drop_column("avatar_url")
|
|
|
|
with op.batch_alter_table("user", schema=None) as batch_op:
|
|
batch_op.drop_column("avatar_url")
|