Add production support for SQLite
This commit is contained in:
1 parent
3918a2ac71
commit
9da68a9625
11 files changed
+486
-20
No files matched your search
@@ -7,6 +7,9 @@ RUN_IN_TRANSACTION = True
|
||||
|
||||
|
||||
async def upgrade(db: BaseDBAsyncClient) -> str:
|
||||
# Migration 0 bootstraps SQLite at the current schema.
|
||||
if db.capabilities.dialect == "sqlite":
|
||||
return "SELECT 1;"
|
||||
return """
|
||||
DROP INDEX IF EXISTS "idx_vault_owner_s_cdc1f8";
|
||||
ALTER TABLE "app_user" DROP CONSTRAINT IF EXISTS "app_user_sub_key";
|
||||
@@ -21,6 +24,8 @@ async def upgrade(db: BaseDBAsyncClient) -> str:
|
||||
|
||||
|
||||
async def downgrade(db: BaseDBAsyncClient) -> str:
|
||||
if db.capabilities.dialect == "sqlite":
|
||||
return "SELECT 1;"
|
||||
return """
|
||||
DROP INDEX IF EXISTS "idx_vault_owner_i_a035fb";
|
||||
DROP INDEX IF EXISTS "uid_app_user_issuer_d243fe";
|
||||
|
||||
Reference in new issue
Block a user