fix: 已学完的课不再重查,连续失败会退避
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"""记住已经学完的课程。"""
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "0004_finished_courses"
|
||||
down_revision = "0003_key_check"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_table(
|
||||
"finished_courses",
|
||||
sa.Column("id", sa.Integer(), primary_key=True),
|
||||
sa.Column("employee_id", sa.String(length=64), nullable=False),
|
||||
sa.Column("knowledge_id", sa.String(length=64), server_default="", nullable=False),
|
||||
sa.UniqueConstraint("employee_id", "knowledge_id", name="uq_finished_course"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_table("finished_courses")
|
||||
Reference in New Issue
Block a user