feat: remove tenant_plugin_auto_upgrade_strategies table and adjust datasource_oauth_params

This commit is contained in:
Harry 2025-07-18 14:44:01 +08:00
parent f325662141
commit 82b531e949
1 changed files with 0 additions and 15 deletions

View File

@ -19,7 +19,6 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('tenant_plugin_auto_upgrade_strategies')
with op.batch_alter_table('datasource_oauth_params', schema=None) as batch_op:
batch_op.alter_column('plugin_id',
existing_type=sa.UUID(),
@ -48,18 +47,4 @@ def downgrade():
existing_type=sa.String(length=255),
type_=sa.UUID(),
existing_nullable=False)
op.create_table('tenant_plugin_auto_upgrade_strategies',
sa.Column('id', sa.UUID(), server_default=sa.text('uuid_generate_v4()'), autoincrement=False, nullable=False),
sa.Column('tenant_id', sa.UUID(), autoincrement=False, nullable=False),
sa.Column('strategy_setting', sa.VARCHAR(length=16), server_default=sa.text("'fix_only'::character varying"), autoincrement=False, nullable=False),
sa.Column('upgrade_time_of_day', sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column('upgrade_mode', sa.VARCHAR(length=16), server_default=sa.text("'exclude'::character varying"), autoincrement=False, nullable=False),
sa.Column('exclude_plugins', postgresql.ARRAY(sa.VARCHAR(length=255)), autoincrement=False, nullable=False),
sa.Column('include_plugins', postgresql.ARRAY(sa.VARCHAR(length=255)), autoincrement=False, nullable=False),
sa.Column('created_at', postgresql.TIMESTAMP(), server_default=sa.text('CURRENT_TIMESTAMP'), autoincrement=False, nullable=False),
sa.Column('updated_at', postgresql.TIMESTAMP(), server_default=sa.text('CURRENT_TIMESTAMP'), autoincrement=False, nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('tenant_plugin_auto_upgrade_strategy_pkey')),
sa.UniqueConstraint('tenant_id', name=op.f('unique_tenant_plugin_auto_upgrade_strategy'), postgresql_include=[], postgresql_nulls_not_distinct=False)
)
# ### end Alembic commands ###