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/Projekt.sql Normal file
View File

@@ -0,0 +1,33 @@
-- Table: public.projekt
-- DROP TABLE IF EXISTS public.projekt;
CREATE TABLE IF NOT EXISTS public.projekt
(
projekt_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
projektname text COLLATE pg_catalog."default",
erstelldatum text COLLATE pg_catalog."default",
strasse text COLLATE pg_catalog."default",
ort text COLLATE pg_catalog."default",
exporttype integer NOT NULL,
kodierungssystem integer NOT NULL,
ref_auftraggeber_id integer NOT NULL DEFAULT 0,
CONSTRAINT "PK_Projekte" PRIMARY KEY (projekt_id),
CONSTRAINT "FK_Projekte_Auftraggebers_AuftraggeberId" FOREIGN KEY (ref_auftraggeber_id)
REFERENCES public."Auftraggebers" ("Id") MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE CASCADE
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.projekt
OWNER to "SewerGen";
-- Index: IX_Projekte_AuftraggeberId
-- DROP INDEX IF EXISTS public."IX_Projekte_AuftraggeberId";
CREATE INDEX IF NOT EXISTS "IX_Projekte_AuftraggeberId"
ON public.projekt USING btree
(ref_auftraggeber_id ASC NULLS LAST)
TABLESPACE pg_default;