fix: Remove bad unique constraint on archives (#3715)

This commit is contained in:
Matthew Zhou
2025-08-03 01:33:14 -07:00
committed by GitHub
parent d81694098a
commit 62bb5ee766
2 changed files with 1 additions and 4 deletions

View File

@@ -52,7 +52,6 @@ def upgrade() -> None:
["organizations.id"],
),
sa.PrimaryKeyConstraint("id"),
sa.UniqueConstraint("name", "organization_id", name="unique_archive_name_per_org"),
)
else:
# Check if archives table already exists
@@ -87,7 +86,6 @@ def upgrade() -> None:
["organizations.id"],
),
sa.PrimaryKeyConstraint("id"),
sa.UniqueConstraint("name", "organization_id", name="unique_archive_name_per_org"),
)
op.create_index("ix_archives_created_at", "archives", ["created_at", "id"], unique=False)

View File

@@ -2,7 +2,7 @@ import uuid
from datetime import datetime, timezone
from typing import TYPE_CHECKING, List, Optional
from sqlalchemy import JSON, Index, String, UniqueConstraint
from sqlalchemy import JSON, Index, String
from sqlalchemy.orm import Mapped, mapped_column, relationship
from letta.orm.mixins import OrganizationMixin
@@ -26,7 +26,6 @@ class Archive(SqlalchemyBase, OrganizationMixin):
__pydantic_model__ = PydanticArchive
__table_args__ = (
UniqueConstraint("name", "organization_id", name="unique_archive_name_per_org"),
Index("ix_archives_created_at", "created_at", "id"),
Index("ix_archives_organization_id", "organization_id"),
)