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", deckelrechtswert numeric(18,4) NOT NULL, deckelhochwert numeric(18,4) NOT NULL, deckelhoehe numeric(18,4) NOT NULL, sohlrechtswert numeric(18,4), sohlhochwert numeric(18,4), sohlhoehe numeric(18,4) NOT NULL, entwaesserung integer NOT NULL, vermesser text COLLATE pg_catalog."default", aufnahmedatum text COLLATE pg_catalog."default", ref_projekt_id integer, CONSTRAINT "PK_schacht" PRIMARY KEY (schacht_id), CONSTRAINT "FK_schacht_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;