|
| 1 | +"""048_authentication_ddl |
| 2 | +
|
| 3 | +Revision ID: 073bf544b373 |
| 4 | +Revises: c1b794a961ce |
| 5 | +Create Date: 2025-10-30 14:11:29.786938 |
| 6 | +
|
| 7 | +""" |
| 8 | +from alembic import op |
| 9 | +import sqlalchemy as sa |
| 10 | +import sqlmodel.sql.sqltypes |
| 11 | + |
| 12 | +# revision identifiers, used by Alembic. |
| 13 | +revision = '073bf544b373' |
| 14 | +down_revision = 'c1b794a961ce' |
| 15 | +branch_labels = None |
| 16 | +depends_on = None |
| 17 | + |
| 18 | + |
| 19 | +def upgrade(): |
| 20 | + # ### commands auto generated by Alembic - please adjust! ### |
| 21 | + op.create_table('sys_authentication', |
| 22 | + sa.Column('id', sa.BigInteger(), nullable=False), |
| 23 | + sa.Column('name', sa.String(255), nullable=False), |
| 24 | + sa.Column('type', sa.Integer(), nullable=False), |
| 25 | + sa.Column('config', sa.Text(), nullable=True), |
| 26 | + sa.Column('enable', sa.Boolean(), nullable=False), |
| 27 | + sa.Column('valid', sa.Boolean(), nullable=False), |
| 28 | + sa.Column('create_time', sa.BigInteger(), nullable=False), |
| 29 | + sa.PrimaryKeyConstraint('id') |
| 30 | + ) |
| 31 | + op.create_index(op.f('ix_sys_authentication_id'), 'sys_authentication', ['id'], unique=False) |
| 32 | + |
| 33 | + # ### end Alembic commands ### |
| 34 | + |
| 35 | + |
| 36 | +def downgrade(): |
| 37 | + # ### commands auto generated by Alembic - please adjust! ### |
| 38 | + op.drop_index(op.f('ix_sys_authentication_id'), table_name='sys_authentication') |
| 39 | + op.drop_table('sys_authentication') |
| 40 | + # ### end Alembic commands ### |
0 commit comments