scripts: sqlite to postgres migration instruction (#5504)

This commit is contained in:
spaced4ndy
2025-01-31 18:47:38 +04:00
committed by GitHub
parent f7d133a63c
commit 1332480170
2 changed files with 105 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
LOAD DATABASE
FROM {{SQLITE_DBPATH}}
INTO {{POSTGRES_CONN}}
WITH include no drop,
truncate,
disable triggers,
create no tables,
create no indexes,
-- pgloader implementation doesn't find "GENERATED ALWAYS AS IDENTITY" sequences,
-- instead we reset sequences manually via custom query after load
reset no sequences,
data only
EXCLUDING TABLE NAMES LIKE 'migrations', 'sqlite_sequence'
SET work_mem to '16MB',
maintenance_work_mem to '512 MB',
search_path to '{{POSTGRES_SCHEMA}}'
;