supported apps domain + some refactor of data types redundancy

This commit is contained in:
user
2026-03-28 16:19:24 +02:00
parent 6639bcd799
commit 671a712b08
26 changed files with 2052 additions and 169 deletions

View File

@@ -0,0 +1,13 @@
CREATE TABLE "supported_app" (
"id" serial PRIMARY KEY NOT NULL,
"title" text NOT NULL,
"package_name" text NOT NULL,
"created_at" timestamp NOT NULL,
"updated_at" timestamp NOT NULL,
CONSTRAINT "supported_app_package_name_unique" UNIQUE("package_name")
);
--> statement-breakpoint
ALTER TABLE "link" ADD COLUMN "supported_app_id" integer NOT NULL;--> statement-breakpoint
ALTER TABLE "link" ADD CONSTRAINT "link_supported_app_id_supported_app_id_fk" FOREIGN KEY ("supported_app_id") REFERENCES "public"."supported_app"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "link" DROP COLUMN "app_name";--> statement-breakpoint
ALTER TABLE "link" DROP COLUMN "app_package";