Fix alter_column missing existing_type for MySQL
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,11 +41,13 @@ def upgrade() -> None:
|
|||||||
op.create_index('ix_evotor_connections_evotor_user_id',
|
op.create_index('ix_evotor_connections_evotor_user_id',
|
||||||
'evotor_connections', ['evotor_user_id'])
|
'evotor_connections', ['evotor_user_id'])
|
||||||
|
|
||||||
op.alter_column('evotor_connections', 'user_id', nullable=True)
|
op.alter_column('evotor_connections', 'user_id',
|
||||||
|
existing_type=sa.Integer(), nullable=True)
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
def downgrade() -> None:
|
||||||
op.alter_column('evotor_connections', 'user_id', nullable=False)
|
op.alter_column('evotor_connections', 'user_id',
|
||||||
|
existing_type=sa.Integer(), nullable=False)
|
||||||
op.drop_index('ix_evotor_connections_evotor_user_id', 'evotor_connections')
|
op.drop_index('ix_evotor_connections_evotor_user_id', 'evotor_connections')
|
||||||
op.drop_constraint('uq_evotor_connections_evotor_user_id', 'evotor_connections')
|
op.drop_constraint('uq_evotor_connections_evotor_user_id', 'evotor_connections')
|
||||||
op.drop_column('evotor_connections', 'evotor_user_id')
|
op.drop_column('evotor_connections', 'evotor_user_id')
|
||||||
|
|||||||
Reference in New Issue
Block a user