上传日志表增加前测字段

This commit is contained in:
18610128193
2026-06-25 11:04:40 +08:00
parent 3c41f56ce5
commit 5fc1e43d4e
2 changed files with 33 additions and 1 deletions
@@ -0,0 +1,29 @@
"""上传日志表增加前测信息字段
Revision ID: a65cf38abbb8
Revises: 5e2c124e5484
Create Date: 2026-06-25 11:03:40.134713
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'a65cf38abbb8'
down_revision: Union[str, None] = '5e2c124e5484'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('upload_task', sa.Column('other_info', sa.String(length=500), nullable=True, comment='其他信息'))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('upload_task', 'other_info')
# ### end Alembic commands ###
+4 -1
View File
@@ -27,4 +27,7 @@ class UploadTask(Base, TimestampMixin, SoftDeleteMixin):
)
oauth_id: Mapped[str] = mapped_column(
String(64), nullable=False, index=True, comment="授权表id"
)
)
other_info: Mapped[str | None] = mapped_column(
String(500), nullable=True, comment="其他信息"
)