diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-04-28 02:13:30 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-04-28 02:13:30 +0000 |
| commit | ef4c533ebacc2cdc97e518f30e9a9350004fcdfb (patch) | |
| tree | 345251a3ed0f4429716fa5edaa31024d8f4cb560 /db/migrations/0035_first_leopardon.sql | |
| parent | 9ceed79cf32c896f8a998399bf1b296506b2cd4a (diff) | |
~20250428 작업사항
Diffstat (limited to 'db/migrations/0035_first_leopardon.sql')
| -rw-r--r-- | db/migrations/0035_first_leopardon.sql | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrations/0035_first_leopardon.sql b/db/migrations/0035_first_leopardon.sql new file mode 100644 index 00000000..a1c154fe --- /dev/null +++ b/db/migrations/0035_first_leopardon.sql @@ -0,0 +1,19 @@ +DROP VIEW "public"."view_tag_subfields";--> statement-breakpoint +ALTER TABLE "bidding-projects" RENAME TO "bidding_projects";--> statement-breakpoint +ALTER TABLE "project_series" RENAME COLUMN "kl_qtr" TO "kl_dt";--> statement-breakpoint +ALTER TABLE "bidding_projects" DROP CONSTRAINT "bidding-projects_pspid_unique";--> statement-breakpoint +ALTER TABLE "project_series" DROP CONSTRAINT "project_series_pspid_bidding-projects_pspid_fk"; +--> statement-breakpoint +ALTER TABLE "rfqs" DROP CONSTRAINT "rfqs_bid_project_id_bidding-projects_id_fk"; +--> statement-breakpoint +ALTER TABLE "tag_subfields" DROP CONSTRAINT "tag_subfields_tag_type_code_project_id_tag_types_code_project_id_fk"; +--> statement-breakpoint +ALTER TABLE "tag_type_class_form_mappings" DROP CONSTRAINT "tag_type_class_form_mappings_project_id_projects_id_fk"; +--> statement-breakpoint +ALTER TABLE "project_series" ADD COLUMN "sc_dt" char(8);--> statement-breakpoint +ALTER TABLE "project_series" ADD COLUMN "lc_dt" char(8);--> statement-breakpoint +ALTER TABLE "project_series" ADD COLUMN "dl_dt" char(8);--> statement-breakpoint +ALTER TABLE "project_series" ADD CONSTRAINT "project_series_pspid_bidding_projects_pspid_fk" FOREIGN KEY ("pspid") REFERENCES "public"."bidding_projects"("pspid") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "rfqs" ADD CONSTRAINT "rfqs_bid_project_id_bidding_projects_id_fk" FOREIGN KEY ("bid_project_id") REFERENCES "public"."bidding_projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "bidding_projects" ADD CONSTRAINT "bidding_projects_pspid_unique" UNIQUE("pspid");--> statement-breakpoint +CREATE VIEW "public"."view_tag_subfields" AS (select "tag_subfields"."id", "tag_subfields"."tag_type_code", "tag_types"."description", "tag_subfields"."attributes_id", "tag_subfields"."attributes_description", "tag_subfields"."expression", "tag_subfields"."delimiter", "tag_subfields"."sort_order", "tag_subfields"."created_at", "tag_subfields"."updated_at", "projects"."id", "projects"."code", "projects"."name" from "tag_subfields" inner join "tag_types" on ("tag_subfields"."tag_type_code" = "tag_types"."code" and "tag_subfields"."project_id" = "tag_types"."project_id") inner join "projects" on "tag_subfields"."project_id" = "projects"."id");
\ No newline at end of file |
