44 lines
1.4 KiB
Python
Executable File
44 lines
1.4 KiB
Python
Executable File
"""修改积分规则为float
|
|
|
|
Revision ID: aa89e695701d
|
|
Revises: dc1fbd112814
|
|
Create Date: 2026-05-22 09:48:36.733150
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = 'aa89e695701d'
|
|
down_revision: Union[str, None] = 'dc1fbd112814'
|
|
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.alter_column('generation_records', 'credits_cost',
|
|
existing_type=sa.INTEGER(),
|
|
type_=sa.Float(),
|
|
existing_nullable=False)
|
|
op.alter_column('generation_records', 'text_credits_cost',
|
|
existing_type=sa.INTEGER(),
|
|
type_=sa.Float(),
|
|
existing_nullable=False)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column('generation_records', 'text_credits_cost',
|
|
existing_type=sa.Float(),
|
|
type_=sa.INTEGER(),
|
|
existing_nullable=False)
|
|
op.alter_column('generation_records', 'credits_cost',
|
|
existing_type=sa.Float(),
|
|
type_=sa.INTEGER(),
|
|
existing_nullable=False)
|
|
# ### end Alembic commands ###
|