summaryrefslogtreecommitdiff
path: root/db/migrations/0326_pretty_toro.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrations/0326_pretty_toro.sql')
-rw-r--r--db/migrations/0326_pretty_toro.sql24
1 files changed, 24 insertions, 0 deletions
diff --git a/db/migrations/0326_pretty_toro.sql b/db/migrations/0326_pretty_toro.sql
new file mode 100644
index 00000000..6ae77048
--- /dev/null
+++ b/db/migrations/0326_pretty_toro.sql
@@ -0,0 +1,24 @@
+CREATE TABLE "price_adjustment_forms" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "company_condition_responses_id" integer NOT NULL,
+ "item_name" varchar(255),
+ "adjustment_reflection_point" varchar(255),
+ "major_applicable_raw_material" text,
+ "adjustment_formula" text,
+ "raw_material_price_index" text,
+ "reference_date" date,
+ "comparison_date" date,
+ "adjustment_ratio" numeric(5, 2),
+ "notes" text,
+ "adjustment_conditions" text,
+ "major_non_applicable_raw_material" text,
+ "adjustment_period" varchar(100),
+ "contractor_writer" varchar(100),
+ "adjustment_date" date,
+ "non_applicable_reason" text,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "updated_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "company_condition_responses" ADD COLUMN "is_initial_response" boolean;--> statement-breakpoint
+ALTER TABLE "price_adjustment_forms" ADD CONSTRAINT "price_adjustment_forms_company_condition_responses_id_company_condition_responses_id_fk" FOREIGN KEY ("company_condition_responses_id") REFERENCES "public"."company_condition_responses"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file