Organize directories

This commit is contained in:
Darren Clarke 2023-02-13 13:10:48 +00:00
parent 8a91c9b89b
commit 4898382f78
433 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,31 @@
const { spawn } = require("child_process");
const findWorkspaceRoot = require("find-yarn-workspace-root");
if (process.env.CI) {
process.exit(0);
}
const connectionString = process.env.GM_DBURL;
if (!connectionString) {
console.error(
"This script should only be called from a graphile-migrate action."
);
process.exit(1);
}
spawn(
process.env.PG_DUMP || "pg_dump",
[
"--no-sync",
"--schema-only",
"--no-owner",
"--exclude-schema=graphile_migrate",
"--exclude-schema=graphile_worker",
`--file=${findWorkspaceRoot()}/data/schema.sql`,
connectionString,
],
{
stdio: "inherit",
shell: true,
}
);