feat(db): add Customer.add_time column + migration

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-05 18:39:17 +08:00
parent 9499110427
commit b5733f15d2
3 changed files with 38 additions and 0 deletions
@@ -0,0 +1,36 @@
"""customer add_time
Revision ID: 3892dbfab839
Revises: 96975050fa79
Create Date: 2026-08-05 18:37:00.679685
"""
from collections.abc import Sequence
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision: str = '3892dbfab839'
down_revision: str | Sequence[str] | None = '96975050fa79'
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('customer', schema=None) as batch_op:
batch_op.add_column(sa.Column('add_time', sa.BigInteger(), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('customer', schema=None) as batch_op:
batch_op.drop_column('add_time')
# ### end Alembic commands ###