feat(sqlite): CI Tests for Alembic and SQLite (#3358)

Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
This commit is contained in:
Kian Jones
2025-07-17 18:04:13 -07:00
committed by GitHub
parent f670bd7619
commit 0cd8c830c9
109 changed files with 2539 additions and 138 deletions

View File

@@ -12,6 +12,7 @@ import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from alembic import op
from letta.settings import settings
# revision identifiers, used by Alembic.
revision: str = "416b9d2db10b"
@@ -21,6 +22,10 @@ depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# Skip this migration for SQLite
if not settings.letta_pg_uri_no_default:
return
# ### commands auto generated by Alembic - please adjust! ###
# Rename the table
op.rename_table("job_usage_statistics", "steps")
@@ -74,6 +79,10 @@ def upgrade() -> None:
def downgrade() -> None:
# Skip this migration for SQLite
if not settings.letta_pg_uri_no_default:
return
# ### commands auto generated by Alembic - please adjust! ###
# Remove step_id from messages first to avoid foreign key conflicts
op.drop_constraint("fk_messages_step_id", "messages", type_="foreignkey")