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
@@ -4,11 +4,16 @@ 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 """
|
||||
ALTER TABLE "authority" ADD "template_key" VARCHAR(64);"""
|
||||
|
||||
|
||||
async def downgrade(db: BaseDBAsyncClient) -> str:
|
||||
if db.capabilities.dialect == "sqlite":
|
||||
return "SELECT 1;"
|
||||
return """
|
||||
ALTER TABLE "authority" DROP COLUMN "template_key";"""
|
||||
|
||||
|
||||
Reference in new issue
Block a user