export const user = pgTable('user', {
id: uuid('id').primaryKey(),
profileId: serial('profile_id').references(() => profile.id),
});
export const profile = pgTable('profile', {
id: serial('id').primaryKey(),
email: text('email').unique(),
name: text('name'),
gender: genderEnum('gender'),
dob: timestamp('dob', { precision: 6, withTimezone: true }),
updatedAt: timestamp('updated_at', { mode: 'date', precision: 3 }).$onUpdate(
() => new Date(),
),
});
export const user = pgTable('user', {
id: uuid('id').primaryKey(),
profileId: serial('profile_id').references(() => profile.id),
});
export const profile = pgTable('profile', {
id: serial('id').primaryKey(),
email: text('email').unique(),
name: text('name'),
gender: genderEnum('gender'),
dob: timestamp('dob', { precision: 6, withTimezone: true }),
updatedAt: timestamp('updated_at', { mode: 'date', precision: 3 }).$onUpdate(
() => new Date(),
),
});