Files
EnuivTools/backend/alembic/versions/0012_account_profile.py
T

22 lines
686 B
Python

"""账号记下首页上的姓名和部门,供管理端用户列表显示。"""
from alembic import op
import sqlalchemy as sa
revision = "0012_account_profile"
down_revision = "0011_drop_proxy_list"
branch_labels = None
depends_on = None
def upgrade() -> None:
with op.batch_alter_table("accounts") as batch:
batch.add_column(sa.Column("user_name", sa.String(length=64), server_default="", nullable=False))
batch.add_column(sa.Column("company", sa.String(length=300), server_default="", nullable=False))
def downgrade() -> None:
with op.batch_alter_table("accounts") as batch:
batch.drop_column("company")
batch.drop_column("user_name")