20 lines
509 B
Python
20 lines
509 B
Python
"""用户表保存刷新时写入的本月学时。"""
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "0006_month_hours"
|
|
down_revision = "0005_courses"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
with op.batch_alter_table("accounts") as batch:
|
|
batch.add_column(sa.Column("month_hours", sa.String(length=32), nullable=False, server_default=""))
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table("accounts") as batch:
|
|
batch.drop_column("month_hours")
|