|
| 1 | +"""empty message |
| 2 | +
|
| 3 | +Revision ID: e408f8766753 |
| 4 | +Revises: cb12c4238120 |
| 5 | +Create Date: 2025-11-24 17:34:04.436927 |
| 6 | +
|
| 7 | +""" |
| 8 | +from alembic import op |
| 9 | +import sqlalchemy as sa |
| 10 | +import sqlmodel.sql.sqltypes |
| 11 | +from sqlalchemy.dialects import postgresql |
| 12 | + |
| 13 | +# revision identifiers, used by Alembic. |
| 14 | +revision = 'e408f8766753' |
| 15 | +down_revision = 'cb12c4238120' |
| 16 | +branch_labels = None |
| 17 | +depends_on = None |
| 18 | + |
| 19 | + |
| 20 | +def upgrade(): |
| 21 | + op.create_table('ds_recommended_problem', |
| 22 | + sa.Column('id', sa.BIGINT(), |
| 23 | + sa.Identity(always=True, start=1, increment=1, minvalue=1, maxvalue=9999999999, |
| 24 | + cycle=False, cache=1), autoincrement=True, nullable=False), |
| 25 | + sa.Column('datasource_id', sa.BIGINT(), autoincrement=False, nullable=True), |
| 26 | + sa.Column('question', sa.TEXT(), autoincrement=False, nullable=True), |
| 27 | + sa.Column('remark', sa.TEXT(), autoincrement=False, nullable=True), |
| 28 | + sa.Column('sort', sa.BIGINT(), autoincrement=False, nullable=True), |
| 29 | + sa.Column('create_time', postgresql.TIMESTAMP(precision=6), autoincrement=False, nullable=True), |
| 30 | + sa.Column('create_by', sa.BIGINT(), autoincrement=False, nullable=True), |
| 31 | + sa.PrimaryKeyConstraint('id', name=op.f('ds_recommended_problem_pkey')) |
| 32 | + ) |
| 33 | + op.add_column('core_datasource', sa.Column('recommended_config', sa.BigInteger(),default=0, nullable=True)) |
| 34 | + |
| 35 | +def downgrade(): |
| 36 | + op.drop_table('ds_recommended_problem') |
| 37 | + op.drop_column('core_datasource', 'recommended_config') |
| 38 | + |
0 commit comments