refactor: update Clerk authentication integration and improve organization handling

This commit is contained in:
Abhimanyu Saharan
2026-02-09 23:55:52 +05:30
parent 6f76e430f4
commit 3326100205
13 changed files with 763 additions and 269 deletions

View File

@@ -0,0 +1,31 @@
"""Allow duplicate organization names.
Revision ID: a1e6b0d62f0c
Revises: 658dca8f4a11
Create Date: 2026-02-09 00:00:00.000000
"""
from __future__ import annotations
from alembic import op
# revision identifiers, used by Alembic.
revision = "a1e6b0d62f0c"
down_revision = "658dca8f4a11"
branch_labels = None
depends_on = None
def upgrade() -> None:
"""Drop global unique constraint on organization names."""
op.drop_constraint("uq_organizations_name", "organizations", type_="unique")
def downgrade() -> None:
"""Restore global unique constraint on organization names."""
op.create_unique_constraint(
"uq_organizations_name",
"organizations",
["name"],
)