Skip to content

Commit fbbcc52

Browse files
th-236: Business Journey: Saving Order with shift id + getting all orders with joined driver & truck info (#269)
* th-236: + change order scema, response structure * th-236: * change types, small corrects * th-236: * correct readme * th-236: * remove comment code * th-236: * correct initializeNew()
1 parent 4ab202d commit fbbcc52

28 files changed

+1116
-201
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ALTER TABLE "orders"
2+
DROP CONSTRAINT "orders_driver_id_driver_details_id_fk";
3+
4+
--> statement-breakpoint
5+
ALTER TABLE "orders"
6+
ADD COLUMN "shift_id" integer NOT NULL;
7+
8+
--> statement-breakpoint
9+
DO $$ BEGIN
10+
ALTER TABLE "orders" ADD CONSTRAINT "orders_shift_id_shifts_id_fk" FOREIGN KEY ("shift_id") REFERENCES "shifts"("id") ON DELETE no action ON UPDATE no action;
11+
EXCEPTION
12+
WHEN duplicate_object THEN null;
13+
END $$;
14+
15+
--> statement-breakpoint
16+
ALTER TABLE "orders"
17+
DROP COLUMN IF EXISTS "driver_id";

0 commit comments

Comments
 (0)