Why is event_id
of type INTEGER NOT NULL
in the events
table but of type SMALLINT
in the states
table?
Also, assuming they are linked, shouldn’t the schema for the states table have a line like:
FOREIGN KEY(event_id) REFERENCES (event_id) events,