feat(ocp): printer sync and logging logic added
This commit is contained in:
24
migrations/0027_free_green_goblin.sql
Normal file
24
migrations/0027_free_green_goblin.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE "printer_data" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"humanReadable_id" text NOT NULL,
|
||||
"name" text NOT NULL,
|
||||
"ipAddress" text,
|
||||
"port" numeric,
|
||||
"status" text,
|
||||
"statusText" text,
|
||||
"last_time_printed" timestamp DEFAULT now() NOT NULL,
|
||||
"assigned" boolean DEFAULT false,
|
||||
"remark" text,
|
||||
"printDelay" numeric DEFAULT '90',
|
||||
"processes" jsonb DEFAULT '[]'::jsonb,
|
||||
"print_delay_override" boolean DEFAULT false,
|
||||
"add_Date" timestamp DEFAULT now(),
|
||||
"upd_date" timestamp DEFAULT now(),
|
||||
CONSTRAINT "printer_data_humanReadable_id_unique" UNIQUE("humanReadable_id")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "printer_log" RENAME COLUMN "name" TO "ip";--> statement-breakpoint
|
||||
ALTER TABLE "printer_log" ADD COLUMN "printer_sn" text;--> statement-breakpoint
|
||||
ALTER TABLE "printer_log" ADD COLUMN "condition" text NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "printer_log" ADD COLUMN "message" text;--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "printer_id" ON "printer_data" USING btree ("humanReadable_id");
|
||||
Reference in New Issue
Block a user