DB updated

This commit is contained in:
2023-04-14 09:06:00 +02:00
parent 19bba6dfc1
commit 040b22f01e
8 changed files with 144 additions and 144 deletions

33
SQL/Schacht.sql Normal file
View File

@@ -0,0 +1,33 @@
-- Table: public.schacht
-- DROP TABLE IF EXISTS public.schacht;
CREATE TABLE IF NOT EXISTS public.schacht
(
schacht_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
objektbezeichnung text COLLATE pg_catalog."default",
rechtswert numeric(18,4) NOT NULL,
hochwert numeric(18,4) NOT NULL,
sohlhoehe numeric(18,4) NOT NULL,
deckelhoehe numeric(18,4) NOT NULL,
entwaesserung integer NOT NULL,
ref_projekt_id integer,
CONSTRAINT "PK_Schaechte" PRIMARY KEY (schacht_id),
CONSTRAINT "FK_Schaechte_Projekte_ProjektId" FOREIGN KEY (ref_projekt_id)
REFERENCES public.projekt (projekt_id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.schacht
OWNER to "SewerGen";
-- Index: IX_Schaechte_ProjektId
-- DROP INDEX IF EXISTS public."IX_Schaechte_ProjektId";
CREATE INDEX IF NOT EXISTS "IX_Schaechte_ProjektId"
ON public.schacht USING btree
(ref_projekt_id ASC NULLS LAST)
TABLESPACE pg_default;