export const users = pgTable(
'user',
{
id: uuid('id').primaryKey().defaultRandom().notNull(),
name: text('name'),
email: text('email'),
createdAt: timestamp('created_at', { precision: 3 }).notNull().defaultNow(),
updatedAt: timestamp('updated_at', { precision: 3 }).notNull().defaultNow(),
},
(table) => ({
emailIdx: index('email_idx').on(table.email),
nameIdx: index('name_idx').on(table.name),
createdAtIdx: index('created_at_idx').on(table.createdAt),
updatedAtIdx: index('updated_at_idx').on(table.updatedAt),
}),
);
export const users = pgTable(
'user',
{
id: uuid('id').primaryKey().defaultRandom().notNull(),
name: text('name'),
email: text('email'),
createdAt: timestamp('created_at', { precision: 3 }).notNull().defaultNow(),
updatedAt: timestamp('updated_at', { precision: 3 }).notNull().defaultNow(),
},
(table) => ({
emailIdx: index('email_idx').on(table.email),
nameIdx: index('name_idx').on(table.name),
createdAtIdx: index('created_at_idx').on(table.createdAt),
updatedAtIdx: index('updated_at_idx').on(table.updatedAt),
}),
);