59 lines
1.5 KiB
Python
59 lines
1.5 KiB
Python
"""Rules min/max money
|
|
|
|
Revision ID: e36e6321568e
|
|
Revises: 0ce89e987770
|
|
Create Date: 2022-12-10 18:55:07.149010+00:00
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "e36e6321568e"
|
|
down_revision = "0ce89e987770"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column(
|
|
"categories_rules",
|
|
"min_amount",
|
|
existing_type=sa.DOUBLE_PRECISION(precision=53),
|
|
type_=sa.Numeric(precision=16, scale=2),
|
|
existing_nullable=True,
|
|
schema="transactions",
|
|
)
|
|
op.alter_column(
|
|
"categories_rules",
|
|
"max_amount",
|
|
existing_type=sa.DOUBLE_PRECISION(precision=53),
|
|
type_=sa.Numeric(precision=16, scale=2),
|
|
existing_nullable=True,
|
|
schema="transactions",
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column(
|
|
"categories_rules",
|
|
"max_amount",
|
|
existing_type=sa.Numeric(precision=16, scale=2),
|
|
type_=sa.DOUBLE_PRECISION(precision=53),
|
|
existing_nullable=True,
|
|
schema="transactions",
|
|
)
|
|
op.alter_column(
|
|
"categories_rules",
|
|
"min_amount",
|
|
existing_type=sa.Numeric(precision=16, scale=2),
|
|
type_=sa.DOUBLE_PRECISION(precision=53),
|
|
existing_nullable=True,
|
|
schema="transactions",
|
|
)
|
|
# ### end Alembic commands ###
|