summaryrefslogtreecommitdiff
path: root/db/migrations/0205_perfect_zzzax.sql
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-07-09 12:19:05 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-07-09 12:19:05 +0000
commit6d654b1ba2c19e0bf1745b636908e3b00a0f02c7 (patch)
treef6d48c0d3a65b428a828acea5db65db8e7bf0db8 /db/migrations/0205_perfect_zzzax.sql
parent44794a8628997c0d979adb5bd6711cd848b3e397 (diff)
(대표님) 20250709 변경사항 (약 18시 30분까지)
Diffstat (limited to 'db/migrations/0205_perfect_zzzax.sql')
-rw-r--r--db/migrations/0205_perfect_zzzax.sql23
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrations/0205_perfect_zzzax.sql b/db/migrations/0205_perfect_zzzax.sql
new file mode 100644
index 00000000..b8b92461
--- /dev/null
+++ b/db/migrations/0205_perfect_zzzax.sql
@@ -0,0 +1,23 @@
+CREATE TABLE "template_items" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "form_mapping_id" integer NOT NULL,
+ "tmpl_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "tmpl_type" varchar(100) NOT NULL,
+ "spr_lst_setup" json NOT NULL,
+ "grd_lst_setup" json NOT NULL,
+ "spr_itm_lst_setup" json NOT NULL,
+ "description" text,
+ "is_active" boolean DEFAULT true NOT NULL,
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
+ CONSTRAINT "uniq_tmpl_in_form_mapping" UNIQUE("form_mapping_id","tmpl_id"),
+ CONSTRAINT "uniq_name_in_form_mapping" UNIQUE("form_mapping_id","name")
+);
+--> statement-breakpoint
+ALTER TABLE "evaluation_submissions" DROP CONSTRAINT "evaluation_submissions_vendor_id_vendors_id_fk";
+--> statement-breakpoint
+ALTER TABLE "ocr_rows" ADD COLUMN "file_name" varchar(255);--> statement-breakpoint
+ALTER TABLE "ocr_rows" ADD COLUMN "inspection_date" varchar(255);--> statement-breakpoint
+ALTER TABLE "template_items" ADD CONSTRAINT "template_items_form_mapping_id_tag_type_class_form_mappings_id_fk" FOREIGN KEY ("form_mapping_id") REFERENCES "public"."tag_type_class_form_mappings"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "evaluation_submissions" DROP COLUMN "vendor_id"; \ No newline at end of file