feat(database): add replace-existing option for PostgreSQL restores

Allow single-database PostgreSQL imports to drop matching objects before restore. The API and import form accept replace_existing, which adds --clean --if-exists to pg_restore, and pg_restore now uses --exit-on-error.
This commit is contained in:
Andras Bacsai
2026-09-09 11:48:17 +02:00
parent ab3b3926aa
commit 4accae95b5
13 changed files with 134 additions and 18 deletions
+15
View File
@@ -21764,6 +21764,11 @@
"dump_all": {
"type": "boolean",
"default": false
},
"replace_existing": {
"description": "Drop matching PostgreSQL objects before restoring a single-database archive.",
"type": "boolean",
"default": false
}
},
"type": "object"
@@ -21790,6 +21795,11 @@
"dump_all": {
"type": "boolean",
"default": false
},
"replace_existing": {
"description": "Drop matching PostgreSQL objects before restoring a single-database archive.",
"type": "boolean",
"default": false
}
},
"type": "object"
@@ -21813,6 +21823,11 @@
"dump_all": {
"type": "boolean",
"default": false
},
"replace_existing": {
"description": "Drop matching PostgreSQL objects before restoring a single-database archive.",
"type": "boolean",
"default": false
}
},
"type": "object"