CREATE TABLE IF NOT EXISTS gruppen ( id UUID PRIMARY KEY, gruppenname VARCHAR NOT NULL, erstellt_am TIMESTAMP WITH TIME ZONE NOT NULL, geaendert_am TIMESTAMP WITH TIME ZONE NOT NULL ) CREATE TYPE gruppen_herkunft AS ENUM ( 'direkt', 'indirekt', 'beides' );