|
| 1 | +"""034_permission_modify |
| 2 | +
|
| 3 | +Revision ID: 2ec7855d3564 |
| 4 | +Revises: 3cb5d6a54f2e |
| 5 | +Create Date: 2025-08-04 19:54:41.533467 |
| 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 = '2ec7855d3564' |
| 15 | +down_revision = '3cb5d6a54f2e' |
| 16 | +branch_labels = None |
| 17 | +depends_on = None |
| 18 | + |
| 19 | + |
| 20 | +def upgrade(): |
| 21 | + # ### commands auto generated by Alembic - please adjust! ### |
| 22 | + op.alter_column('ds_rules', 'permission_list', |
| 23 | + existing_type=postgresql.JSONB(astext_type=sa.Text()), |
| 24 | + type_=sa.Text(), |
| 25 | + existing_nullable=True) |
| 26 | + op.alter_column('ds_rules', 'user_list', |
| 27 | + existing_type=postgresql.JSONB(astext_type=sa.Text()), |
| 28 | + type_=sa.Text(), |
| 29 | + existing_nullable=True) |
| 30 | + # ### end Alembic commands ### |
| 31 | + |
| 32 | + |
| 33 | +def downgrade(): |
| 34 | + # ### commands auto generated by Alembic - please adjust! ### |
| 35 | + op.alter_column('ds_rules', 'user_list', |
| 36 | + existing_type=sa.Text(), |
| 37 | + type_=postgresql.JSONB(astext_type=sa.Text()), |
| 38 | + existing_nullable=True) |
| 39 | + op.alter_column('ds_rules', 'permission_list', |
| 40 | + existing_type=sa.Text(), |
| 41 | + type_=postgresql.JSONB(astext_type=sa.Text()), |
| 42 | + existing_nullable=True) |
| 43 | + # ### end Alembic commands ### |
0 commit comments