mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
feat: permission json to text
This commit is contained in:
@@ -38,8 +38,8 @@ def upgrade():
|
||||
sa.Column('enable', sa.Boolean(), nullable=False),
|
||||
sa.Column('name', sqlmodel.sql.sqltypes.AutoString(length=128), nullable=False),
|
||||
sa.Column('description', sqlmodel.sql.sqltypes.AutoString(length=512), nullable=True),
|
||||
sa.Column('permission_list', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
|
||||
sa.Column('user_list', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
|
||||
sa.Column('permission_list', sa.Text(), nullable=True),
|
||||
sa.Column('user_list', sa.Text(), nullable=True),
|
||||
sa.Column('white_list_user', sa.Text(), nullable=True),
|
||||
sa.Column('create_time', sa.DateTime(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
"""034_permission_modify
|
||||
|
||||
Revision ID: 2ec7855d3564
|
||||
Revises: 3cb5d6a54f2e
|
||||
Create Date: 2025-08-04 19:54:41.533467
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel.sql.sqltypes
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '2ec7855d3564'
|
||||
down_revision = '3cb5d6a54f2e'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('ds_rules', 'permission_list',
|
||||
existing_type=postgresql.JSONB(astext_type=sa.Text()),
|
||||
type_=sa.Text(),
|
||||
existing_nullable=True)
|
||||
op.alter_column('ds_rules', 'user_list',
|
||||
existing_type=postgresql.JSONB(astext_type=sa.Text()),
|
||||
type_=sa.Text(),
|
||||
existing_nullable=True)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('ds_rules', 'user_list',
|
||||
existing_type=sa.Text(),
|
||||
type_=postgresql.JSONB(astext_type=sa.Text()),
|
||||
existing_nullable=True)
|
||||
op.alter_column('ds_rules', 'permission_list',
|
||||
existing_type=sa.Text(),
|
||||
type_=postgresql.JSONB(astext_type=sa.Text()),
|
||||
existing_nullable=True)
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user