@catladder/cli 4.6.2 → 4.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/catenv/index.js +1 -1
- package/dist/bundles/cli/index.js +1 -1
- package/dist/cli/src/gcloud/cloudSql/copyDb.js +6 -2
- package/dist/cli/src/gcloud/cloudSql/copyDb.js.map +1 -1
- package/dist/pipeline/src/constants.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/gcloud/cloudSql/copyDb.ts +7 -2
|
@@ -30,8 +30,12 @@ const createCopyDbScript = ({
|
|
|
30
30
|
const copyDBScript = `
|
|
31
31
|
set -e
|
|
32
32
|
|
|
33
|
-
${targetPSQL(
|
|
34
|
-
|
|
33
|
+
${targetPSQL(
|
|
34
|
+
// connect to the always-existing "postgres" maintenance database:
|
|
35
|
+
// without an explicit dbname, psql falls back to the username and
|
|
36
|
+
// fails with e.g. 'FATAL: database "user" does not exist'
|
|
37
|
+
`--dbname=postgres -c 'drop database "${targetDbName}" WITH (FORCE)' 1> /dev/null || true`)}
|
|
38
|
+
${targetPSQL(`--dbname=postgres -c 'create database "${targetDbName}"' 1> /dev/null`)}
|
|
35
39
|
echo "Estimating database size..."
|
|
36
40
|
DB_SIZE=$(PGPASSWORD=${encodedSourcePassword} psql --dbname=postgres://${encodedSourceUsername}:${encodedSourcePassword}@localhost:${sourcePort}/${sourceDbName} -t -A -c "SELECT pg_database_size('${sourceDbName}')")
|
|
37
41
|
# pg_database_size includes indexes, TOAST, and free space — pg_dump output is roughly 40% of that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyDb.js","sourceRoot":"","sources":["../../../../../src/gcloud/cloudSql/copyDb.ts"],"names":[],"mappings":";;;AAAA,iEAA8C;AAWvC,MAAM,WAAW,GAAG,KAAK,EAAE,IAAU,EAAE,EAAE;IAC9C,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,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,OAAO,EAAE,CAAC;IAE/G,yEAAyE;IACzE,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACjE,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAEjE,MAAM,YAAY,GAAG;;;QAGf,UAAU;IACV,kEAAkE;IAClE,kEAAkE;IAClE,0DAA0D;IAC1D,wCAAwC,YAAY,sCAAsC,CAC3F;QACC,UAAU,CACV,0CAA0C,YAAY,iBAAiB,CACxE;;6BAEsB,qBAAqB,6BAA6B,qBAAqB,IAAI,qBAAqB,cAAc,UAAU,IAAI,YAAY,uCAAuC,YAAY;;;;;;;;;;;;;0CAa9K,qBAAqB,IAAI,qBAAqB,cAAc,UAAU,IAAI,YAAY,2CAA2C,UAAU,CAAC,IAAI,YAAY,gBAAgB,CAAC;;;OAGhN,CAAC;IACN,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
7
|
-
exports.PIPELINE_IMAGE_TAG = "v4-6-
|
|
7
|
+
exports.PIPELINE_IMAGE_TAG = "v4-6-4-d6efbf06" || "latest";
|
|
8
8
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
|