25 lines
579 B
TypeScript
25 lines
579 B
TypeScript
// https://orm.drizzle.team/docs/sql-schema-declaration
|
|
// honestly I don't know why I would want Drizzle with Supabase but I'll keep it for now.
|
|
|
|
import { sql } from 'drizzle-orm';
|
|
import {
|
|
bigint,
|
|
index,
|
|
pgTable,
|
|
serial,
|
|
text,
|
|
timestamp,
|
|
uuid,
|
|
varchar,
|
|
} from 'drizzle-orm/pg-core';
|
|
|
|
export const users = pgTable('users', {
|
|
id: serial('id').primaryKey(),
|
|
fullName: text('full_name'),
|
|
phone: varchar('phone', { length: 256 }),
|
|
status: text('status').notNull(),
|
|
updatedAt: timestamp('updatedAt')
|
|
.default(sql`CURRENT_TIMESTAMP`)
|
|
.notNull(),
|
|
});
|