feat(database): add "patch" table with foreign key constraints and create snapshot for version 7

This commit is contained in:
Mauricio Siu
2026-02-16 23:53:31 -06:00
parent 13b94ed3be
commit 0fc043d0ad
3 changed files with 7464 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
CREATE TABLE "patch" (
"patchId" text PRIMARY KEY NOT NULL,
"filePath" text NOT NULL,
"enabled" boolean DEFAULT true NOT NULL,
"content" text NOT NULL,
"createdAt" text NOT NULL,
"updatedAt" text,
"applicationId" text,
"composeId" text,
CONSTRAINT "patch_filepath_application_unique" UNIQUE("filePath","applicationId"),
CONSTRAINT "patch_filepath_compose_unique" UNIQUE("filePath","composeId")
);
--> statement-breakpoint
ALTER TABLE "patch" ADD CONSTRAINT "patch_applicationId_application_applicationId_fk" FOREIGN KEY ("applicationId") REFERENCES "public"."application"("applicationId") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "patch" ADD CONSTRAINT "patch_composeId_compose_composeId_fk" FOREIGN KEY ("composeId") REFERENCES "public"."compose"("composeId") ON DELETE cascade ON UPDATE no action;

File diff suppressed because it is too large Load Diff

View File

@@ -1016,6 +1016,13 @@
"when": 1771297084611,
"tag": "0144_odd_gunslinger",
"breakpoints": true
},
{
"idx": 145,
"version": "7",
"when": 1771307553867,
"tag": "0145_bitter_vivisector",
"breakpoints": true
}
]
}