feat(quality): priority ranking added
This commit is contained in:
1
lstV2/database/migrations/0076_stiff_champions.sql
Normal file
1
lstV2/database/migrations/0076_stiff_champions.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "qualityRequest" ADD COLUMN "priority" integer DEFAULT 4;
|
||||
2278
lstV2/database/migrations/meta/0076_snapshot.json
Normal file
2278
lstV2/database/migrations/meta/0076_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -533,6 +533,13 @@
|
||||
"when": 1762983466464,
|
||||
"tag": "0075_tan_unicorn",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 76,
|
||||
"version": "7",
|
||||
"when": 1763134709763,
|
||||
"tag": "0076_stiff_champions",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,45 +1,46 @@
|
||||
import {
|
||||
text,
|
||||
pgTable,
|
||||
numeric,
|
||||
index,
|
||||
timestamp,
|
||||
boolean,
|
||||
uuid,
|
||||
uniqueIndex,
|
||||
integer,
|
||||
boolean,
|
||||
index,
|
||||
integer,
|
||||
numeric,
|
||||
pgTable,
|
||||
text,
|
||||
timestamp,
|
||||
uniqueIndex,
|
||||
uuid,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
|
||||
import { z } from "zod";
|
||||
|
||||
export const qualityRequest = pgTable(
|
||||
"qualityRequest",
|
||||
{
|
||||
request_id: uuid("request_id").defaultRandom().primaryKey(),
|
||||
article: numeric("article"),
|
||||
description: text("description"),
|
||||
runningNr: text("runningNr"),
|
||||
lotNr: numeric("lotNr"),
|
||||
warehouseAtRequest: text("warehouseAtRequest"),
|
||||
locationAtRequest: text("locationAtRequest"),
|
||||
warehouseMovedTo: text("warehouseMovedTo"),
|
||||
locationMovedTo: text("locationMovedTo"),
|
||||
durationToMove: integer("durationToMove"),
|
||||
qualityDurationToInspect: integer("qualityDurationToInspect"),
|
||||
returnDurationToInspect: integer("returnDurationToInspect"),
|
||||
locationDropOff: text("locationDropOff"),
|
||||
palletStatus: integer("palletStatus"),
|
||||
palletStatusText: text("palletStatusText"),
|
||||
palletRequest: integer("palletRequest"),
|
||||
add_date: timestamp("add_date").defaultNow(),
|
||||
add_user: text("add_user").default("LST"),
|
||||
upd_date: timestamp("upd_date").defaultNow(),
|
||||
upd_user: text("upd_user").default("LST"),
|
||||
},
|
||||
(table) => [
|
||||
// uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),
|
||||
// uniqueIndex("role_name").on(table.name),
|
||||
]
|
||||
"qualityRequest",
|
||||
{
|
||||
request_id: uuid("request_id").defaultRandom().primaryKey(),
|
||||
article: numeric("article"),
|
||||
description: text("description"),
|
||||
runningNr: text("runningNr"),
|
||||
lotNr: numeric("lotNr"),
|
||||
warehouseAtRequest: text("warehouseAtRequest"),
|
||||
locationAtRequest: text("locationAtRequest"),
|
||||
warehouseMovedTo: text("warehouseMovedTo"),
|
||||
locationMovedTo: text("locationMovedTo"),
|
||||
durationToMove: integer("durationToMove"),
|
||||
qualityDurationToInspect: integer("qualityDurationToInspect"),
|
||||
returnDurationToInspect: integer("returnDurationToInspect"),
|
||||
locationDropOff: text("locationDropOff"),
|
||||
palletStatus: integer("palletStatus"),
|
||||
palletStatusText: text("palletStatusText"),
|
||||
palletRequest: integer("palletRequest"),
|
||||
priority: integer("priority").default(4), // 1,2,3,4
|
||||
add_date: timestamp("add_date").defaultNow(),
|
||||
add_user: text("add_user").default("LST"),
|
||||
upd_date: timestamp("upd_date").defaultNow(),
|
||||
upd_user: text("upd_user").default("LST"),
|
||||
},
|
||||
(table) => [
|
||||
// uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),
|
||||
// uniqueIndex("role_name").on(table.name),
|
||||
],
|
||||
);
|
||||
|
||||
// Schema for inserting a user - can be used to validate API requests
|
||||
|
||||
Reference in New Issue
Block a user