import { defineConfig } from "drizzle-kit";
import { env } from "./shared/lib/env";

// @ts-expect-error - Polyfill for BigInt serialization
BigInt.prototype.toJSON = function () {
    return this.toString();
};

export default defineConfig({
    schema: "./shared/db/schema.ts",
    out: "./shared/db/migrations",
    dialect: "postgresql",
    dbCredentials: {
        url: env.DATABASE_URL,
    },
});
