feat(private-api): support OAuth client operations
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
"""auth: add `name` & `description` for OAuth client
|
||||
|
||||
Revision ID: 749bb2c2c33a
|
||||
Revises: a8669ba11e96
|
||||
Create Date: 2025-08-12 09:29:12.085060
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "749bb2c2c33a"
|
||||
down_revision: str | Sequence[str] | None = "a8669ba11e96"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column(
|
||||
"oauth_clients",
|
||||
sa.Column("name", sqlmodel.sql.sqltypes.AutoString(length=100), nullable=False),
|
||||
)
|
||||
op.add_column("oauth_clients", sa.Column("description", sa.Text(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_oauth_clients_name"), table_name="oauth_clients")
|
||||
op.drop_column("oauth_clients", "description")
|
||||
op.drop_column("oauth_clients", "name")
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user