This commit is contained in:
2025-09-26 15:28:35 +02:00
commit faa2f94192
52 changed files with 5313 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';
import * as schema from './schema';
import { env } from '$env/dynamic/private';
if (!env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
const client = postgres(env.DATABASE_URL);
export const db = drizzle(client, { schema });

View File

@@ -0,0 +1,6 @@
import { pgTable, serial, integer } from 'drizzle-orm/pg-core';
export const user = pgTable('user', {
id: serial('id').primaryKey(),
age: integer('age')
});