mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 12:27:43 +00:00
23 lines
399 B
TypeScript
23 lines
399 B
TypeScript
import { drizzle } from "drizzle-orm/postgres-js";
|
|
import {
|
|
pgTable,
|
|
serial,
|
|
varchar,
|
|
text,
|
|
timestamp,
|
|
integer,
|
|
boolean,
|
|
} from "drizzle-orm/pg-core";
|
|
import postgres from "postgres";
|
|
|
|
const table = pgTable("test", {
|
|
id: text("id").primaryKey(),
|
|
});
|
|
|
|
const schema = {
|
|
table,
|
|
};
|
|
|
|
export const client = postgres(process.env.POSTGRES_URL || "");
|
|
export const db = drizzle(client, { schema });
|