diff options
| author | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
| commit | 1a2241c40e10193c5ff7008a7b7b36cc1d855d96 (patch) | |
| tree | 8a5587f10ca55b162d7e3254cb088b323a34c41b /db/migrations/0019_bumpy_anthem.sql | |
initial commit
Diffstat (limited to 'db/migrations/0019_bumpy_anthem.sql')
| -rw-r--r-- | db/migrations/0019_bumpy_anthem.sql | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/db/migrations/0019_bumpy_anthem.sql b/db/migrations/0019_bumpy_anthem.sql new file mode 100644 index 00000000..8d8498f1 --- /dev/null +++ b/db/migrations/0019_bumpy_anthem.sql @@ -0,0 +1,3 @@ +DROP VIEW "public"."vendor_rfq_view";--> statement-breakpoint +CREATE VIEW "public"."vendor_tbe_view" AS (select "vendors"."id" as "vendor_id", "vendors"."vendor_name" as "vendor_name", "vendors"."vendor_code" as "vendor_code", "vendors"."address" as "address", "vendors"."country" as "country", "vendors"."email" as "email", "vendors"."website" as "website", "vendors"."status" as "vendor_status", "rfq_vendors"."rfq_id" as "rfq_id", "rfq_vendors"."status" as "rfq_vendor_status", "rfq_vendors"."updated_at" as "rfq_vendor_updated", "rfqs"."rfq_code" as "rfq_code", "rfqs"."project_code" as "project_code", "rfqs"."project_name" as "project_name", "rfqs"."description" as "description", "rfqs"."due_date" as "due_date", "rfq_evaluations"."result" as "tbe_result", "rfq_evaluations"."notes" as "tbe_note", "rfq_evaluations"."updated_at" as "tbe_updated" from "vendors" left join "rfq_vendors" on "rfq_vendors"."vendor_id" = "vendors"."id" left join "rfqs" on "rfq_vendors"."rfq_id" = "rfqs"."id" left join "rfq_evaluations" on ("rfq_evaluations"."vendor_id" = "vendors"."id" and "rfq_evaluations"."eval_type" = 'TBE' and "rfq_evaluations"."rfq_id" = "rfq_vendors"."rfq_id"));--> statement-breakpoint +CREATE VIEW "public"."vendor_rfq_view" AS (select "vendors"."id" as "vendor_id", "vendors"."vendor_name" as "vendor_name", "vendors"."vendor_code" as "vendor_code", "vendors"."address" as "address", "vendors"."country" as "country", "vendors"."email" as "email", "vendors"."website" as "website", "vendors"."status" as "vendor_status", "rfq_vendors"."rfq_id" as "rfq_id", "rfq_vendors"."status" as "rfq_vendor_status", "rfq_vendors"."updated_at" as "rfq_vendor_updated", "rfqs"."rfq_code" as "rfq_code", "rfqs"."project_code" as "project_code", "rfqs"."project_name" as "project_name", "rfqs"."description" as "description", "rfqs"."due_date" as "due_date" from "vendors" left join "rfq_vendors" on "rfq_vendors"."vendor_id" = "vendors"."id" left join "rfqs" on "rfq_vendors"."rfq_id" = "rfqs"."id");
\ No newline at end of file |
