mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 01:36:57 +08:00
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
"""060_platform_token_ddl
|
|
|
|
Revision ID: b40e41c67db3
|
|
Revises: db1a95567cbb
|
|
Create Date: 2026-01-04 15:50:31.550287
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
import sqlmodel.sql.sqltypes
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'b40e41c67db3'
|
|
down_revision = 'db1a95567cbb'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('sys_platform_token',
|
|
sa.Column('id', sa.BigInteger(), nullable=False),
|
|
sa.Column('token', sqlmodel.sql.sqltypes.AutoString(length=255), nullable=False),
|
|
sa.Column('create_time', sa.BigInteger(), nullable=False),
|
|
sa.Column('exp_time', sa.BigInteger(), nullable=False),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
op.create_index(op.f('ix_sys_platform_token_id'), 'sys_platform_token', ['id'], unique=False)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_index(op.f('ix_sys_platform_token_id'), table_name='sys_platform_token')
|
|
op.drop_table('sys_platform_token')
|
|
# ### end Alembic commands ###
|