source: database/drizzle/db.ts@ 1bf6e1f

main
Last change on this file since 1bf6e1f was e729b88, checked in by Tome <gjorgievtome@…>, 7 months ago

remove deprecated query and telefunc

  • Property mode set to 100644
File size: 367 bytes
Line 
1import { Pool } from "pg";
2import { drizzle } from "drizzle-orm/node-postgres";
3import * as schema from "./schema";
4
5const pool = new Pool({
6 connectionString: process.env.DATABASE_URL,
7})
8
9pool.on("connect", (client) => {
10 client.query('SET search_path TO pcforge, public');
11});
12
13export const db = drizzle(pool, { schema });
14
15export type Database = typeof db;
Note: See TracBrowser for help on using the repository browser.