feat(sqlite): CI Tests for Alembic and SQLite (#3358)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user