Changeset c4dd17d for database/drizzle/schema
- Timestamp:
- 12/20/25 04:03:51 (7 months ago)
- Branches:
- main
- Children:
- 5ce5904
- Parents:
- 37bcb87
- File:
-
- 1 edited
-
database/drizzle/schema/components.ts (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
database/drizzle/schema/components.ts
r37bcb87 rc4dd17d 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 componentsTable = pgTable("components", { … … 7 8 price: numeric("price").notNull(), 8 9 imgUrl: text("img_url"), 9 }); 10 type: text("type").notNull() 11 }, 12 (t) => ({ 13 checkType: check("check_type", sql`${t.type} in 14 ('cpu', 'gpu', 'memory', 'storage', 'power_supply', 'motherboard', 'case', 'cooler', 'memory_card', 'optical_drive', 'sound_card', 'cables', 'network_adapter', 'network_card')`) 15 }), 16 ); 10 17 11 18 // Base Components
Note:
See TracChangeset
for help on using the changeset viewer.
