itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg1(1) en(302637) cam(2) version(1) first declares ItsPduHeader - which uses StationID - and then declares StationID. The resulting SQL code looks something like this:
CREATE TABLE ItsPduHeader (
id SERIAL PRIMARY KEY,
protocol_version SMALLINT NOT NULL,
message_id SMALLINT NOT NULL,
station_id INTEGER REFERENCES StationID(id) ON DELETE CASCADE ON UPDATE CASCADE NOT NULL
);
CREATE INDEX ON ItsPduHeader(station_id);
CREATE TABLE StationID (
id SERIAL PRIMARY KEY
);
This does not work, because while creating the ItsPduHeader the table for StationID does not yet exist and can therefore not be referenced.
itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg1(1) en(302637) cam(2) version(1)
first declaresItsPduHeader
- which usesStationID
- and then declaresStationID
. The resulting SQL code looks something like this:This does not work, because while creating the
ItsPduHeader
the table forStationID
does not yet exist and can therefore not be referenced.