buh
This commit is contained in:
parent
dcc647d085
commit
a4000a589a
11 changed files with 1119 additions and 5235 deletions
|
@ -1,7 +1,5 @@
|
|||
import { drizzle } from 'drizzle-orm/d1';
|
||||
import { drizzle } from 'drizzle-orm/bun-sqlite';
|
||||
import * as schema from './schema';
|
||||
import { env } from '$env/dynamic/private';
|
||||
|
||||
console.log(env.HANDLES_DB)
|
||||
|
||||
export const db = drizzle(env.HANDLES_DB, { schema });
|
||||
export const db = drizzle(env.DATABASE_URL, { schema });
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import { sql } from 'drizzle-orm';
|
||||
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';
|
||||
|
||||
export const user = sqliteTable('user', {
|
||||
id: integer('id').primaryKey(),
|
||||
age: integer('age')
|
||||
id: integer('id').primaryKey({ autoIncrement: true}),
|
||||
did: text('did').notNull(),
|
||||
handle: text('handle').notNull(),
|
||||
created_at: text('created_at').notNull().default(sql`CURRENT_TIMESTAMP`),
|
||||
updated_at: text('updated_at').notNull().default(sql`CURRENT_TIMESTAMP`),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue