11 lines
637 B
SQL
11 lines
637 B
SQL
CREATE TABLE "ship_upgrades" (
|
|
"ship_id" text NOT NULL,
|
|
"upgrade_id" text NOT NULL,
|
|
"level" integer NOT NULL,
|
|
CONSTRAINT "ship_upgrades_ship_id_upgrade_id_pk" PRIMARY KEY("ship_id","upgrade_id")
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "ships" ADD COLUMN "in_shop_until" bigint;--> statement-breakpoint
|
|
ALTER TABLE "ships" ADD COLUMN "shop_upgrade_id" text;--> statement-breakpoint
|
|
ALTER TABLE "ships" ADD COLUMN "shop_level" integer;--> statement-breakpoint
|
|
ALTER TABLE "ship_upgrades" ADD CONSTRAINT "ship_upgrades_ship_id_ships_id_fk" FOREIGN KEY ("ship_id") REFERENCES "public"."ships"("id") ON DELETE cascade ON UPDATE no action; |