diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-07 01:44:45 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-07 01:44:45 +0000 |
| commit | 90f79a7a691943a496f67f01c1e493256070e4de (patch) | |
| tree | 37275fde3ae08c2bca384fbbc8eb378de7e39230 /db/migrations/0191_tearful_gargoyle.sql | |
| parent | fbb3b7f05737f9571b04b0a8f4f15c0928de8545 (diff) | |
(대표님) 변경사항 20250707 10시 43분 - unstaged 변경사항 추가
Diffstat (limited to 'db/migrations/0191_tearful_gargoyle.sql')
| -rw-r--r-- | db/migrations/0191_tearful_gargoyle.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrations/0191_tearful_gargoyle.sql b/db/migrations/0191_tearful_gargoyle.sql new file mode 100644 index 00000000..10d6e47e --- /dev/null +++ b/db/migrations/0191_tearful_gargoyle.sql @@ -0,0 +1,15 @@ +DROP VIEW "public"."reviewer_evaluations_view";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "process_score";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "price_score";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "delivery_score";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "self_evaluation_score";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "participation_bonus";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "quality_deduction";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "total_score";--> statement-breakpoint +ALTER TABLE "reviewer_evaluations" DROP COLUMN "grade";--> statement-breakpoint +CREATE VIEW "public"."reviewer_evaluations_view" AS (select "reviewer_evaluations"."id", "reviewer_evaluations"."periodic_evaluation_id", "reviewer_evaluations"."evaluation_target_reviewer_id", "reviewer_evaluations"."is_completed", "reviewer_evaluations"."completed_at", "reviewer_evaluations"."reviewer_comment", "reviewer_evaluations"."created_at", "reviewer_evaluations"."updated_at", "periodic_evaluations"."evaluation_period", "periodic_evaluations"."documents_submitted", "periodic_evaluations"."submission_date", "periodic_evaluations"."submission_deadline", "periodic_evaluations"."final_score", "periodic_evaluations"."final_grade", "periodic_evaluations"."evaluation_score", "periodic_evaluations"."evaluation_grade", "periodic_evaluations"."status", "periodic_evaluations"."review_completed_at", "periodic_evaluations"."finalized_at", "periodic_evaluations"."finalized_by", "periodic_evaluations"."evaluation_note", "evaluation_targets"."evaluation_year", "evaluation_targets"."division", "evaluation_targets"."vendor_id", "evaluation_targets"."vendor_code", "evaluation_targets"."vendor_name", "evaluation_targets"."domestic_foreign", "evaluation_targets"."material_type", "evaluation_targets"."admin_comment", "evaluation_targets"."consolidated_comment", "evaluation_targets"."confirmed_at", "evaluation_targets"."confirmed_by", "evaluation_targets"."ld_claim_count", "evaluation_targets"."ld_claim_amount", "evaluation_targets"."ld_claim_currency", "evaluation_target_reviewers"."department_code", "evaluation_target_reviewers"."department_name_from", "evaluation_target_reviewers"."reviewer_user_id", reviewer_user.name as "reviewer_name", reviewer_user.email as "reviewer_email", "evaluation_target_reviewers"."assigned_at", "evaluation_target_reviewers"."assigned_by", assigned_by_user.name as "assigned_by_user_name", finalized_by_user.name as "finalized_by_user_name", finalized_by_user.email as "finalized_by_user_email", + CASE + WHEN "reviewer_evaluations"."is_completed" = true THEN 'COMPLETED' + ELSE 'NOT_STARTED' + END + as "evaluation_progress" from "reviewer_evaluations" left join "periodic_evaluations" on "reviewer_evaluations"."periodic_evaluation_id" = "periodic_evaluations"."id" left join "evaluation_targets" on "periodic_evaluations"."evaluation_target_id" = "evaluation_targets"."id" left join "evaluation_target_reviewers" on "reviewer_evaluations"."evaluation_target_reviewer_id" = "evaluation_target_reviewers"."id" left join users reviewer_user on "evaluation_target_reviewers"."reviewer_user_id" = reviewer_user.id left join users assigned_by_user on "evaluation_target_reviewers"."assigned_by" = assigned_by_user.id left join users finalized_by_user on "periodic_evaluations"."finalized_by" = finalized_by_user.id order by "reviewer_evaluations"."is_completed" ASC, "reviewer_evaluations"."updated_at" DESC);
\ No newline at end of file |
