17 lines
470 B
MySQL
17 lines
470 B
MySQL
|
CREATE TABLE IF NOT EXISTS rollen_gruppen (
|
||
|
rolle_id UUID NOT NULL,
|
||
|
gruppe_id UUID NOT NULL,
|
||
|
|
||
|
CONSTRAINT pk_rollen_gruppen PRIMARY KEY (rolle_id, gruppe_id),
|
||
|
|
||
|
CONSTRAINT fk_rollen_gruppen_gruppe FOREIGN KEY (gruppe_id)
|
||
|
REFERENCES gruppen (id) MATCH SIMPLE
|
||
|
ON UPDATE CASCADE
|
||
|
ON DELETE CASCADE,
|
||
|
|
||
|
CONSTRAINT fk_rollen_gruppen_rolle FOREIGN KEY (rolle_id)
|
||
|
REFERENCES rollen (id) MATCH SIMPLE
|
||
|
ON UPDATE CASCADE
|
||
|
ON DELETE CASCADE
|
||
|
)
|