supported apps domain + some refactor of data types redundancy
This commit is contained in:
13
packages/db/migrations/0003_workable_runaways.sql
Normal file
13
packages/db/migrations/0003_workable_runaways.sql
Normal 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";
|
||||
Reference in New Issue
Block a user