mr main and rebuild migration

This commit is contained in:
Yansong Zhang 2025-10-23 11:11:35 +08:00
parent b8a29bfb35
commit 04f9637b6f
1 changed files with 6 additions and 19 deletions

View File

@ -1,18 +1,18 @@
"""add table explore banner and trial
Revision ID: 3993fd9e9c2f
Revises: 68519ad5cd18
Create Date: 2025-10-11 14:42:01.954865
Revision ID: f9f6d18a37f9
Revises: ae662b25d9bc
Create Date: 2025-10-23 11:10:18.079355
"""
from alembic import op
import models as models
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '3993fd9e9c2f'
down_revision = '68519ad5cd18'
revision = 'f9f6d18a37f9'
down_revision = 'ae662b25d9bc'
branch_labels = None
depends_on = None
@ -54,24 +54,11 @@ def upgrade():
with op.batch_alter_table('trial_apps', schema=None) as batch_op:
batch_op.create_index('trial_app_app_id_idx', ['app_id'], unique=False)
batch_op.create_index('trial_app_tenant_id_idx', ['tenant_id'], unique=False)
with op.batch_alter_table('datasource_providers', schema=None) as batch_op:
batch_op.alter_column('avatar_url',
existing_type=sa.TEXT(),
type_=sa.String(length=255),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('datasource_providers', schema=None) as batch_op:
batch_op.alter_column('avatar_url',
existing_type=sa.String(length=255),
type_=sa.TEXT(),
existing_nullable=True)
with op.batch_alter_table('trial_apps', schema=None) as batch_op:
batch_op.drop_index('trial_app_tenant_id_idx')
batch_op.drop_index('trial_app_app_id_idx')