Changeset b615094 for database/drizzle/schema/users.ts
- Timestamp:
- 12/20/25 01:31:36 (7 months ago)
- Branches:
- main
- Children:
- 0d447f6
- Parents:
- b69759d
- File:
-
- 1 edited
-
database/drizzle/schema/users.ts (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
database/drizzle/schema/users.ts
rb69759d rb615094 1 import { pgTable, serial, integer, text, numeric, boolean, date, primaryKey } from "drizzle-orm/pg-core"; 1 import {pgTable, serial, integer, text, numeric, boolean, date, primaryKey, check} from "drizzle-orm/pg-core"; 2 import {sql} from "drizzle-orm"; 2 3 3 4 export const usersTable = pgTable("users", { … … 26 27 status: text("status") 27 28 .notNull() 28 .default("pending"), // Pending, Approved, Rejected29 .default("pending"), 29 30 componentType: text("component_type").notNull() 30 }); 31 }, 32 (t) => ({ 33 checkStatus: check("check_status", sql`${t.status} in ('pending', 'approved', 'rejected')`), 34 }), 35 ); 31 36 32 37 export type userItem = typeof usersTable.$inferSelect;
Note:
See TracChangeset
for help on using the changeset viewer.
