diff --git a/api/migrations/versions/2025_11_18_1400-a7b4e8f2c9d1_add_enduser_authentication_provider.py b/api/migrations/versions/2025_11_18_1400-a7b4e8f2c9d1_add_enduser_authentication_provider.py index f4e1a504dd..f04ec55253 100644 --- a/api/migrations/versions/2025_11_18_1400-a7b4e8f2c9d1_add_enduser_authentication_provider.py +++ b/api/migrations/versions/2025_11_18_1400-a7b4e8f2c9d1_add_enduser_authentication_provider.py @@ -58,16 +58,9 @@ def upgrade(): sa.UniqueConstraint( "end_user_id", "provider", - "name", name="unique_enduser_authentication_provider", ), ) - op.create_index( - "tool_enduser_authentication_provider_name_idx", - "tool_enduser_authentication_providers", - ["name"], - unique=False, - ) op.create_index( "tool_enduser_authentication_provider_end_user_id_idx", "tool_enduser_authentication_providers", @@ -93,10 +86,6 @@ def downgrade(): "tool_enduser_authentication_provider_end_user_id_idx", table_name="tool_enduser_authentication_providers", ) - op.drop_index( - "tool_enduser_authentication_provider_name_idx", - table_name="tool_enduser_authentication_providers", - ) op.drop_table("tool_enduser_authentication_providers") # ### end Alembic commands ### diff --git a/api/models/tools.py b/api/models/tools.py index 249eb9fd6a..2af592cd30 100644 --- a/api/models/tools.py +++ b/api/models/tools.py @@ -119,7 +119,7 @@ class EndUserAuthenticationProvider(TypeBase): __tablename__ = "tool_enduser_authentication_providers" __table_args__ = ( - sa.UniqueConstraint("end_user_id", "provider", "name"), + sa.UniqueConstraint("end_user_id", "provider"), ) # id of the authentication provider @@ -128,7 +128,6 @@ class EndUserAuthenticationProvider(TypeBase): String(256), nullable=False, default="API KEY 1", - index=True ) # id of the tenant tenant_id: Mapped[str] = mapped_column(StringUUID, nullable=False)