Skip to content

Commit 4c29fc1

Browse files
committed
feat: permission schema
1 parent 38f6e69 commit 4c29fc1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"""030_permission_oid
2+
3+
Revision ID: c1d7ac00b3a8
4+
Revises: 77d4c39ec22f
5+
Create Date: 2025-07-21 11:49:43.115524
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 = 'c1d7ac00b3a8'
15+
down_revision = '77d4c39ec22f'
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def upgrade():
21+
# ### commands auto generated by Alembic - please adjust! ###
22+
op.add_column('ds_rules', sa.Column('oid', sa.BigInteger(), nullable=True))
23+
op.alter_column('ds_permission', 'id',
24+
existing_type=sa.INTEGER(),
25+
type_=sa.BigInteger(),
26+
existing_nullable=False,
27+
autoincrement=True,
28+
existing_server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1,
29+
maxvalue=2147483647, cycle=False, cache=1))
30+
# ### end Alembic commands ###
31+
32+
33+
def downgrade():
34+
# ### commands auto generated by Alembic - please adjust! ###
35+
op.alter_column('ds_permission', 'id',
36+
existing_type=sa.BigInteger(),
37+
type_=sa.INTEGER(),
38+
existing_nullable=False,
39+
autoincrement=True,
40+
existing_server_default=sa.Identity(always=True, start=1, increment=1, minvalue=1,
41+
maxvalue=2147483647, cycle=False, cache=1))
42+
op.drop_column('ds_rules', 'oid')
43+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)