Skip to content
Snippets Groups Projects
Commit 207d12c4 authored by alrwasheda's avatar alrwasheda :speech_balloon:
Browse files
parent 5c9f3340
No related branches found
No related tags found
No related merge requests found
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment