Files
video-gen/video-gen-api/alembic/versions/6101ba8d5761_user_oauth表新增归属公司应用_新增授权链接字段.py
T

32 lines
1.1 KiB
Python

"""user_oauth表新增归属公司应用,新增授权链接字段
Revision ID: 6101ba8d5761
Revises: 9ac2212e1b8e
Create Date: 2026-06-10 16:34:38.842582
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '6101ba8d5761'
down_revision: Union[str, None] = '9ac2212e1b8e'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user_oauth_app', sa.Column('auth_url', sa.String(length=256), nullable=True, comment='应用授权链接'))
op.add_column('user_oauth_app', sa.Column('company', sa.String(length=256), nullable=True, comment='应用归属公司名称'))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('user_oauth_app', 'company')
op.drop_column('user_oauth_app', 'auth_url')
# ### end Alembic commands ###