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

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

const poolLegacy = new Pool({
    connectionString: process.env["DATABASE_URL_LEGACY"]
});

export const adapterLegacy = new PrismaPg(poolLegacy);