fix: pg url
This commit is contained in:
parent
752a5b2cfe
commit
83e50e7349
|
@ -28,8 +28,8 @@ const readWritePool = new Pool({
|
|||
});
|
||||
|
||||
const readOnlyDatabaseURL =
|
||||
getSecret("digitalocean-postgres-public") ||
|
||||
"postgresql://public_read_only_user:gOcihnLhqRIQUQYt@postgres-red-do-user-10290909-0.b.db.ondigitalocean.com:25060/metaforecastpg?sslmode=require";
|
||||
"postgresql://public_read_only_user:gOcihnLhqRIQUQYt@postgres-red-do-user-10290909-0.b.db.ondigitalocean.com:25060/metaforecastpg?sslmode=require" ||
|
||||
getSecret("digitalocean-postgres-public");
|
||||
const readOnlyPool = new Pool({
|
||||
connectionString: readOnlyDatabaseURL,
|
||||
ssl: {
|
||||
|
@ -169,6 +169,11 @@ export async function pgInitialize() {
|
|||
);
|
||||
console.log("Create dashboard table and its index");
|
||||
|
||||
await runPgCommand({
|
||||
command: dropTable("latest", "dashboards"),
|
||||
pool: readWritePool,
|
||||
});
|
||||
|
||||
await runPgCommand({
|
||||
command: buildDashboard(),
|
||||
pool: readWritePool,
|
||||
|
|
Loading…
Reference in New Issue
Block a user