diff --git a/scripts/0.0.1/schema/2.init_road_maintenance_cost.sql b/scripts/0.0.1/schema/2.init_road_maintenance_cost.sql new file mode 100644 index 00000000..8d521bcd --- /dev/null +++ b/scripts/0.0.1/schema/2.init_road_maintenance_cost.sql @@ -0,0 +1,23 @@ + +-- ---------------------------- +-- Table structure for road_maintenance_cost +-- ---------------------------- +DROP TABLE IF EXISTS "public"."road_maintenance_cost"; +CREATE TABLE "public"."road_maintenance_cost" ( + "id" int4 NOT NULL DEFAULT nextval('road_maintenance_cost_id_seq'::regclass), + "mId" int4, + "county_name" varchar(15) COLLATE "pg_catalog"."default", + "road_length_county" float8, + "road_cost_county" numeric(10,2), + "road_length_village" float8, + "road_cost_village" numeric(10,2), + "road_length_township" float8, + "road_cost_township" numeric(10,2), + "maintenance_date" timestamptz(6) +) +; + +-- ---------------------------- +-- Foreign Keys structure for table road_maintenance_cost +-- ---------------------------- +ALTER TABLE "public"."road_maintenance_cost" ADD CONSTRAINT "road_maintenance_cost_mId_fkey" FOREIGN KEY ("mId") REFERENCES "public"."road_maintenance" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;