feat(siloadjustments): added email for comments :D
This commit is contained in:
12
database/migrations/0043_free_winter_soldier.sql
Normal file
12
database/migrations/0043_free_winter_soldier.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE "siloAdjustments" (
|
||||
"lsiloAdjust_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"level" integer,
|
||||
"locationID" integer,
|
||||
"currentStockLevel" numeric,
|
||||
"newLevel" numeric,
|
||||
"comments" text DEFAULT '',
|
||||
"dateAdjusted" timestamp DEFAULT now(),
|
||||
"lastDateAdjusted" timestamp DEFAULT now(),
|
||||
"statusMessage" text DEFAULT '',
|
||||
"add_user" text DEFAULT 'LST_Serivce'
|
||||
);
|
||||
5
database/migrations/0044_hot_smasher.sql
Normal file
5
database/migrations/0044_hot_smasher.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE "siloAdjustments" ADD COLUMN "comment" text DEFAULT '';--> statement-breakpoint
|
||||
ALTER TABLE "siloAdjustments" ADD COLUMN "commentAddedBy" text;--> statement-breakpoint
|
||||
ALTER TABLE "siloAdjustments" ADD COLUMN "commentDate" text;--> statement-breakpoint
|
||||
ALTER TABLE "siloAdjustments" DROP COLUMN "comments";--> statement-breakpoint
|
||||
ALTER TABLE "siloAdjustments" DROP COLUMN "statusMessage";
|
||||
1
database/migrations/0045_heavy_ravenous.sql
Normal file
1
database/migrations/0045_heavy_ravenous.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "siloAdjustments" ADD COLUMN "commentKey" text;
|
||||
1
database/migrations/0046_keen_firebird.sql
Normal file
1
database/migrations/0046_keen_firebird.sql
Normal file
@@ -0,0 +1 @@
|
||||
CREATE UNIQUE INDEX "subModule_name" ON "subModules" USING btree ("name");
|
||||
1
database/migrations/0047_silky_starbolt.sql
Normal file
1
database/migrations/0047_silky_starbolt.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "subModules" ADD COLUMN "icon" text;
|
||||
1539
database/migrations/meta/0043_snapshot.json
Normal file
1539
database/migrations/meta/0043_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1544
database/migrations/meta/0044_snapshot.json
Normal file
1544
database/migrations/meta/0044_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1550
database/migrations/meta/0045_snapshot.json
Normal file
1550
database/migrations/meta/0045_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1566
database/migrations/meta/0046_snapshot.json
Normal file
1566
database/migrations/meta/0046_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1572
database/migrations/meta/0047_snapshot.json
Normal file
1572
database/migrations/meta/0047_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -302,6 +302,41 @@
|
||||
"when": 1743778477759,
|
||||
"tag": "0042_big_power_pack",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 43,
|
||||
"version": "7",
|
||||
"when": 1743809547351,
|
||||
"tag": "0043_free_winter_soldier",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 44,
|
||||
"version": "7",
|
||||
"when": 1743811709366,
|
||||
"tag": "0044_hot_smasher",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 45,
|
||||
"version": "7",
|
||||
"when": 1743819367359,
|
||||
"tag": "0045_heavy_ravenous",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 46,
|
||||
"version": "7",
|
||||
"when": 1743821039322,
|
||||
"tag": "0046_keen_firebird",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 47,
|
||||
"version": "7",
|
||||
"when": 1743822056329,
|
||||
"tag": "0047_silky_starbolt",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
39
database/schema/siloAdjustments.ts
Normal file
39
database/schema/siloAdjustments.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import {
|
||||
text,
|
||||
pgTable,
|
||||
numeric,
|
||||
timestamp,
|
||||
uuid,
|
||||
integer,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
|
||||
import { z } from "zod";
|
||||
|
||||
export const siloAdjustments = pgTable(
|
||||
"siloAdjustments",
|
||||
{
|
||||
siloAdjust_id: uuid("lsiloAdjust_id").defaultRandom().primaryKey(),
|
||||
warehouseID: integer("level"),
|
||||
locationID: integer("locationID"),
|
||||
currentStockLevel: numeric("currentStockLevel"),
|
||||
newLevel: numeric("newLevel"),
|
||||
comment: text("comment").default(""),
|
||||
dateAdjusted: timestamp("dateAdjusted").defaultNow(),
|
||||
lastDateAdjusted: timestamp("lastDateAdjusted").defaultNow(),
|
||||
commentAddedBy: text("commentAddedBy"),
|
||||
commentDate: text("commentDate"),
|
||||
commentKey: text("commentKey"),
|
||||
add_user: text("add_user").default("LST_Serivce"),
|
||||
},
|
||||
(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
|
||||
// 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(siloAdjustments);
|
||||
Reference in New Issue
Block a user