mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-13 11:50:37 +08:00
first api-interaction, fix auth_method unique-index
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""add_auth_method_to_ix_person_username
|
||||
|
||||
Revision ID: 0daec5f8135f
|
||||
Revises: 6368515778c5
|
||||
Create Date: 2022-12-22 18:35:59.609013
|
||||
|
||||
"""
|
||||
import sqlalchemy as sa # noqa: F401
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "0daec5f8135f"
|
||||
down_revision = "6368515778c5"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("ix_person_username", table_name="person")
|
||||
op.create_index("ix_person_username", "person", ["api_client_id", "username", "auth_method"], unique=True)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("ix_person_username", table_name="person")
|
||||
op.create_index("ix_person_username", "person", ["api_client_id", "username"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user