import { PrismaPg } from "@prisma/adapter-pg";
import 'dotenv/config'
import { Pool } from "pg";
import { defineConfig } from 'prisma/config'

export default defineConfig({
    schema: "prisma/postgres/",
    migrations: {
        path: "prisma/postgres/migrations",
    },
    datasource: {
        url: process.env["DATABASE_URL_STAGING"],
    },
});

const poolPostgres = new Pool({
    connectionString: process.env["DATABASE_URL_STAGING"],
});

export const adapterPostgres = new PrismaPg(poolPostgres);