feat(ocme cycle counts): tracking of cycle counts and when they were done

This commit is contained in:
2025-04-14 22:15:06 -05:00
parent 2eafbdf45e
commit 95ca2ff2b3
8 changed files with 5303 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
ALTER TABLE "qualityRequest" ALTER COLUMN "durationToMove" SET DATA TYPE integer;--> statement-breakpoint
ALTER TABLE "qualityRequest" ALTER COLUMN "palletStatus" SET DATA TYPE integer;--> statement-breakpoint
ALTER TABLE "qualityRequest" ALTER COLUMN "palletRequest" SET DATA TYPE integer;

View File

@@ -0,0 +1,10 @@
CREATE TABLE "ocmeCycleCounts" (
"ocme_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"laneId" integer,
"warehouseName" numeric NOT NULL,
"laneName" numeric NOT NULL,
"good" boolean DEFAULT false,
"cycleCount" jsonb DEFAULT '[]'::jsonb,
"add_User" text DEFAULT 'LST_System' NOT NULL,
"add_Date" timestamp DEFAULT now()
);

View File

@@ -0,0 +1,3 @@
ALTER TABLE "ocmeCycleCounts" ALTER COLUMN "laneId" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "ocmeCycleCounts" ALTER COLUMN "warehouseName" SET DATA TYPE text;--> statement-breakpoint
ALTER TABLE "ocmeCycleCounts" ALTER COLUMN "laneName" SET DATA TYPE text;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -351,6 +351,27 @@
"when": 1744649552936, "when": 1744649552936,
"tag": "0049_certain_tarot", "tag": "0049_certain_tarot",
"breakpoints": true "breakpoints": true
},
{
"idx": 50,
"version": "7",
"when": 1744681925049,
"tag": "0050_flat_nuke",
"breakpoints": true
},
{
"idx": 51,
"version": "7",
"when": 1744684445081,
"tag": "0051_oval_warpath",
"breakpoints": true
},
{
"idx": 52,
"version": "7",
"when": 1744685129838,
"tag": "0052_dark_human_torch",
"breakpoints": true
} }
] ]
} }

View File

@@ -0,0 +1,37 @@
import {
text,
pgTable,
numeric,
timestamp,
boolean,
uuid,
integer,
jsonb,
} from "drizzle-orm/pg-core";
import { createSelectSchema } from "drizzle-zod";
export const ocmeCycleCounts = pgTable(
"ocmeCycleCounts",
{
ocme_id: uuid("ocme_id").defaultRandom().primaryKey(),
laneId: integer("laneId").notNull(),
warehouseName: text("warehouseName").notNull(),
laneName: text("laneName").notNull(),
good: boolean("good").default(false),
cycleCount: jsonb("cycleCount").default([]),
add_User: text("add_User").default("LST_System").notNull(),
add_Date: timestamp("add_Date").defaultNow(),
},
(table) => [
// uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),
// uniqueIndex("role_name").on(table.name),
//uniqueIndex("ocme_runningNr").on(table.runningNr),
]
);
// Schema for inserting a user - can be used to validate API requests
// export const insertRolesSchema = createInsertSchema(roles, {
// name: z.string().min(3, {message: "Role name must be more than 3 letters"}),
// });
// Schema for selecting a Expenses - can be used to validate API responses
export const selectRolesSchema = createSelectSchema(ocmeCycleCounts);