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");
|
||||
1
migrations/0028_keen_the_fallen.sql
Normal file
1
migrations/0028_keen_the_fallen.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "printer_log" ADD COLUMN "name" text;
|
||||
1
migrations/0029_gigantic_thunderbolt_ross.sql
Normal file
1
migrations/0029_gigantic_thunderbolt_ross.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "printer_data" ADD COLUMN "printer_sn" text;
|
||||
3
migrations/0030_high_invisible_woman.sql
Normal file
3
migrations/0030_high_invisible_woman.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE "printer_data" ALTER COLUMN "port" SET DATA TYPE integer;--> statement-breakpoint
|
||||
ALTER TABLE "printer_data" ALTER COLUMN "printDelay" SET DATA TYPE integer;--> statement-breakpoint
|
||||
ALTER TABLE "printer_data" ALTER COLUMN "printDelay" SET DEFAULT 90;
|
||||
1
migrations/0031_numerous_the_phantom.sql
Normal file
1
migrations/0031_numerous_the_phantom.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "printer_log" ADD COLUMN "created_at" timestamp DEFAULT now();
|
||||
1627
migrations/meta/0027_snapshot.json
Normal file
1627
migrations/meta/0027_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1633
migrations/meta/0028_snapshot.json
Normal file
1633
migrations/meta/0028_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1639
migrations/meta/0029_snapshot.json
Normal file
1639
migrations/meta/0029_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1639
migrations/meta/0030_snapshot.json
Normal file
1639
migrations/meta/0030_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1646
migrations/meta/0031_snapshot.json
Normal file
1646
migrations/meta/0031_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -190,6 +190,41 @@
|
||||
"when": 1775786221817,
|
||||
"tag": "0026_vengeful_wiccan",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 27,
|
||||
"version": "7",
|
||||
"when": 1776085181774,
|
||||
"tag": "0027_free_green_goblin",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 28,
|
||||
"version": "7",
|
||||
"when": 1776085921073,
|
||||
"tag": "0028_keen_the_fallen",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 29,
|
||||
"version": "7",
|
||||
"when": 1776087535705,
|
||||
"tag": "0029_gigantic_thunderbolt_ross",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 30,
|
||||
"version": "7",
|
||||
"when": 1776087914328,
|
||||
"tag": "0030_high_invisible_woman",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 31,
|
||||
"version": "7",
|
||||
"when": 1776098377074,
|
||||
"tag": "0031_numerous_the_phantom",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user