diff --git a/server/src/db/seqConnection.ts b/server/src/db/seqConnection.ts index e816b22acdf089f26c4de42fa15ea3abac2772be..8196a18fa29a64221833c73cb0eeafc0cfea2d0d 100644 --- a/server/src/db/seqConnection.ts +++ b/server/src/db/seqConnection.ts @@ -1,6 +1,6 @@ import { Sequelize } from "sequelize"; import envVars from "./config"; -const pg = require("pg") +const pg = require("pg"); const { Client, QueryResult } = pg; let sequelizeConnection = new Sequelize( @@ -24,7 +24,7 @@ export const createTableIfNotExists = async () => { await client.connect(); //search for db in pg-catalog. if not found, create a one - await client + const tables = client .query(`SELECT * FROM pg_database WHERE datname = '${envVars.dbName}'`) .then((res: typeof QueryResult) => { //------------------------------------------------then