Skip to content

Commit

Permalink
fix: new data aggregation and display
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudambro committed Mar 29, 2024
1 parent 1fb5a48 commit 24b94ee
Show file tree
Hide file tree
Showing 13 changed files with 603 additions and 865 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- AlterEnum
ALTER TYPE "IndicatorsSlugEnum"
ADD
VALUE 'drinking_water';

-- AlterTable
ALTER TABLE
"User"
ADD
COLUMN "udi" TEXT;

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
-- AlterEnum
ALTER TYPE "IndicatorsSlugEnum" ADD VALUE 'drinking_water';

-- AlterTable
ALTER TABLE "User" ADD COLUMN "udi" TEXT;
-- CreateEnum
CREATE TYPE "DrinkingWaterPrelevementConformity" AS ENUM ('C', 'D', 'N', 'S');

-- CreateTable
CREATE TABLE "DrinkingWater" (
Expand All @@ -15,25 +12,18 @@ CREATE TABLE "DrinkingWater" (
"alert_status" "AlertStatusEnum" NOT NULL DEFAULT 'NOT_ALERT_THRESHOLD',
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"code_prelevement" TEXT,
"nom_uge" TEXT,
"nom_distributeur" TEXT,
"nom_moa" TEXT,
"nom_reseau" TEXT,
"date_prelevement" TIMESTAMP(3),
"hubeau_first_url" TEXT,
"last_prelevement_code" TEXT,
"last_prelevement_date" TIMESTAMP(3),
"conclusion_conformite_prelevement" TEXT,
"conformite_limites_bact_prelevement" TEXT,
"conformite_limites_pc_prelevement" TEXT,
"conformite_references_bact_prelevement" TEXT,
"conformite_references_pc_prelevement" TEXT,
"hubeau_udi_url" TEXT,
"hubeau_test_url" TEXT,
"conformite_limites_bact_prelevement" "DrinkingWaterPrelevementConformity",
"conformite_limites_pc_prelevement" "DrinkingWaterPrelevementConformity",
"conformite_references_bact_prelevement" "DrinkingWaterPrelevementConformity",
"conformite_references_pc_prelevement" "DrinkingWaterPrelevementConformity",
"all_tests_results" JSONB,

CONSTRAINT "DrinkingWater_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "DrinkingWater_code_prelevement_key" ON "DrinkingWater"("code_prelevement");

-- CreateIndex
CREATE INDEX "drinking_water_udi_diffusion_date_validity_start" ON "DrinkingWater"("udi", "diffusion_date", "validity_start");
Loading

0 comments on commit 24b94ee

Please sign in to comment.