feat(sqlite): CI Tests for Alembic and SQLite (#3358)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ from typing import Sequence, Union
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
from letta.settings import settings
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "1c8880d671ee"
|
||||
@@ -20,6 +21,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! ###
|
||||
op.create_unique_constraint("unique_block_id_label", "block", ["id", "label"])
|
||||
|
||||
@@ -46,6 +51,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! ###
|
||||
op.drop_constraint("unique_block_id_label", "block", type_="unique")
|
||||
op.drop_table("blocks_agents")
|
||||
|
||||
Reference in New Issue
Block a user