// schema.ts
import { blob, integer, sqliteTable, text } from 'drizzle-orm/sqlite-core';
import { generateId } from 'lucia';
export const userTable = sqliteTable('user', {
id: text('id')
.notNull()
.primaryKey()
.$default(() => generateId(15)),
hashedPassword: text('hashed_password').notNull(),
});
export const contactInformationTable = sqliteTable('contact_information', {
userId: text('user_id')
.notNull()
.unique()
.references(() => userTable.id),
firstName: text('first_name'),
});
// schema.ts
import { blob, integer, sqliteTable, text } from 'drizzle-orm/sqlite-core';
import { generateId } from 'lucia';
export const userTable = sqliteTable('user', {
id: text('id')
.notNull()
.primaryKey()
.$default(() => generateId(15)),
hashedPassword: text('hashed_password').notNull(),
});
export const contactInformationTable = sqliteTable('contact_information', {
userId: text('user_id')
.notNull()
.unique()
.references(() => userTable.id),
firstName: text('first_name'),
});