feat(lstv2 move): moved lstv2 into this app to keep them combined and easier to maintain
This commit is contained in:
30
lstV2/database/schema/prodLabels.ts
Normal file
30
lstV2/database/schema/prodLabels.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
integer,
|
||||
pgTable,
|
||||
uuid,
|
||||
uniqueIndex,
|
||||
text,
|
||||
timestamp,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { createSelectSchema } from "drizzle-zod";
|
||||
|
||||
export const prodlabels = pgTable(
|
||||
"prodlabels",
|
||||
{
|
||||
label_id: uuid("label_id").defaultRandom().primaryKey(),
|
||||
printerID: integer("printerID"),
|
||||
printerName: text("printerName"),
|
||||
line: integer("line"),
|
||||
runningNr: integer("runningNr").notNull(),
|
||||
status: text("status"),
|
||||
add_user: text("add_user").default("lst"),
|
||||
add_date: timestamp("add_date").defaultNow(),
|
||||
upd_date: timestamp("upd_date").defaultNow(),
|
||||
},
|
||||
(table) => [
|
||||
//uniqueIndex("emailUniqueIndex").on(sql`lower(${table.email})`),
|
||||
uniqueIndex("runningNr").on(table.runningNr),
|
||||
]
|
||||
);
|
||||
|
||||
export const prodlabelsSchema = createSelectSchema(prodlabels);
|
||||
Reference in New Issue
Block a user