22 lines
574 B
Python
22 lines
574 B
Python
"""学时达标判断依据:接口本月学时或学时历史统计。"""
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "0013_hours_source"
|
|
down_revision = "0012_study_control"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
with op.batch_alter_table("system_config") as batch:
|
|
batch.add_column(
|
|
sa.Column("hours_source", sa.String(length=16), nullable=False, server_default="api")
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table("system_config") as batch:
|
|
batch.drop_column("hours_source")
|