This commit is contained in:
Face 2025-05-21 21:34:22 +03:00
parent 3b2ec4fe5f
commit 8086aa8f38
51 changed files with 4109 additions and 0 deletions

View file

@ -0,0 +1,6 @@
import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';
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);

View file

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