feat: 凭据刷新时记录本月学时和有效状态

This commit is contained in:
2026-11-15 00:48:18 +08:00
parent 98c11f42d8
commit 9a6f134f56
4 changed files with 58 additions and 18 deletions
@@ -0,0 +1,19 @@
"""用户表保存刷新时写入的本月学时。"""
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")