chore: migrate to postgres

This commit is contained in:
Henry
2024-03-27 20:59:51 +00:00
parent ac3fff47c7
commit 09cd6529fc
35 changed files with 1270 additions and 9723 deletions

View File

@@ -1,12 +1,6 @@
import { Client } from "@planetscale/database";
import { drizzle } from "drizzle-orm/planetscale-serverless";
import { sql } from '@vercel/postgres'
import { drizzle } from 'drizzle-orm/vercel-postgres'
import { env } from "~/env.mjs";
import * as schema from "./schema";
export const db = drizzle(
new Client({
url: env.DATABASE_URL,
}).connection(),
{ schema }
);
export const db = drizzle(sql, { schema })