47 lines
1.5 KiB
Python
47 lines
1.5 KiB
Python
"""expand communication range precision
|
|
|
|
Revision ID: 83be4d38636d
|
|
Revises: f1fa035d3afe
|
|
Create Date: 2026-04-23 14:39:48.339810
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '83be4d38636d'
|
|
down_revision = 'f1fa035d3afe'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('communication_parts', schema=None) as batch_op:
|
|
batch_op.alter_column('range_raw',
|
|
existing_type=sa.NUMERIC(precision=18, scale=3),
|
|
type_=sa.Numeric(precision=24, scale=3),
|
|
existing_nullable=True)
|
|
batch_op.alter_column('range_km',
|
|
existing_type=sa.NUMERIC(precision=18, scale=3),
|
|
type_=sa.Numeric(precision=24, scale=3),
|
|
existing_nullable=True)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('communication_parts', schema=None) as batch_op:
|
|
batch_op.alter_column('range_km',
|
|
existing_type=sa.Numeric(precision=24, scale=3),
|
|
type_=sa.NUMERIC(precision=18, scale=3),
|
|
existing_nullable=True)
|
|
batch_op.alter_column('range_raw',
|
|
existing_type=sa.Numeric(precision=24, scale=3),
|
|
type_=sa.NUMERIC(precision=18, scale=3),
|
|
existing_nullable=True)
|
|
|
|
# ### end Alembic commands ###
|