· 5 years ago · May 14, 2020, 08:50 AM
1CREATE TABLE IF NOT EXISTS radverkehr.o_radweg (
2 radweg_id UUID NOT NULL DEFAULT uuid_generate_v1() PRIMARY KEY,
3 name_id UUID REFERENCES radverkehr.kt_strassenname(name_id),
4 radweg_art_id UUID REFERENCES radverkehr.kt_radweg_art(radweg_art_id),
5 richtung_id UUID REFERENCES radverkehr.kt_richtung(richtung_id),
6 oberflaeche_id UUID REFERENCES radverkehr.kt_oberflaeche(oberflaeche_id),
7 breite NUMERIC(5,3) check (breite > 0),
8 status_id UUID REFERENCES radverkehr.kt_status(status_id),
9 niveau_id UUID REFERENCES radverkehr.kt_niveau(niveau_id),
10 bemerkung text,
11 quelle_id UUID REFERENCES radverkehr.kt_quelle(quelle_id),
12 id_in_quelle varchar(100),
13 geometrie geometry(LINESTRING,25832) NOT NULL,
14 create_date timestamp without time zone not null,
15 update_date timestamp without time zone CHECK (create_date < archive_date),
16 create_user text,
17 update_user text
18);