refactor: modify datasource table field type

This commit is contained in:
junjun
2025-09-22 17:27:38 +08:00
parent 2b220eb9e1
commit f52178f0c4
@@ -0,0 +1,55 @@
"""043_modify_ds_id_type
Revision ID: dac062c1f7b1
Revises: a487d9c69341
Create Date: 2025-09-22 17:20:44.465735
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'dac062c1f7b1'
down_revision = 'a487d9c69341'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('core_datasource', 'id',
existing_type=sa.INTEGER(),
type_=sa.BigInteger(),
existing_nullable=False,
autoincrement=True)
op.alter_column('core_field', 'id',
existing_type=sa.INTEGER(),
type_=sa.BigInteger(),
existing_nullable=False,
autoincrement=True)
op.alter_column('core_table', 'id',
existing_type=sa.INTEGER(),
type_=sa.BigInteger(),
existing_nullable=False,
autoincrement=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('core_table', 'id',
existing_type=sa.BigInteger(),
type_=sa.INTEGER(),
existing_nullable=False,
autoincrement=True)
op.alter_column('core_field', 'id',
existing_type=sa.BigInteger(),
type_=sa.INTEGER(),
existing_nullable=False,
autoincrement=True)
op.alter_column('core_datasource', 'id',
existing_type=sa.BigInteger(),
type_=sa.INTEGER(),
existing_nullable=False,
autoincrement=True)
# ### end Alembic commands ###