mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-04 14:24:58 +08:00
Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
"""${message}
|
||||
"""
|
||||
数据库迁移:${message}
|
||||
|
||||
Revision ID: ${up_revision}
|
||||
Revises: ${down_revision | comma,n}
|
||||
Create Date: ${create_date}
|
||||
版本标识: ${up_revision}
|
||||
前置版本: ${down_revision | comma,n}
|
||||
创建时间: ${create_date}
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
${imports if imports else ""}
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
# Alembic 使用以下标识连接迁移版本链。
|
||||
revision = ${repr(up_revision)}
|
||||
down_revision = ${repr(down_revision)}
|
||||
branch_labels = ${repr(branch_labels)}
|
||||
@@ -17,8 +18,14 @@ depends_on = ${repr(depends_on)}
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""
|
||||
应用本版本的数据库结构或数据变更。
|
||||
"""
|
||||
${upgrades if upgrades else "pass"}
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""
|
||||
执行本版本定义的回退操作。
|
||||
"""
|
||||
${downgrades if downgrades else "pass"}
|
||||
|
||||
Reference in New Issue
Block a user