@clickup/pg-microsharding
Version:
Microshards support for PostgreSQL
22 lines • 741 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.actionInstall = actionInstall;
const install_1 = require("../api/install");
const normalizeDsns_1 = require("../internal/normalizeDsns");
/**
* Installs the library in the provided databases.
*/
async function actionInstall(args) {
const dsns = await (0, normalizeDsns_1.normalizeDsns)(args["dsns"] || args["dsn"]);
if (dsns.length === 0) {
throw "Please provide --dsn or --dsns, DB DSNs to install the library to";
}
for (const dsn of dsns) {
await (0, install_1.install)({
dsn,
schemaNameFmt: args["schema-name-fmt"],
});
}
return true;
}
//# sourceMappingURL=actionInstall.js.map