Table
entry_scan
Every entrance scan; only the first of the day records how the visitor travelled.
Replaces in 2020: Entrance, Ticket.Transportation
Rows 1,251–1,275 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 1251 | 1135 | 4 | 2015-11-10 09:46:40 | 1 | Other |
| 1252 | 1136 | 4 | 2015-11-10 09:46:44 | 1 | Other |
| 1253 | 1139 | 4 | 2015-11-10 09:46:50 | 1 | Other |
| 1254 | 1141 | 4 | 2015-11-10 09:46:54 | 1 | Other |
| 1255 | 1142 | 4 | 2015-11-10 09:46:58 | 1 | Other |
| 1256 | 1137 | 4 | 2015-11-10 09:47:03 | 1 | Other |
| 1257 | 1144 | 4 | 2015-11-10 09:47:24 | 1 | Other |
| 1258 | 1140 | 4 | 2015-11-10 09:47:35 | 1 | Other |
| 1259 | 1149 | 4 | 2015-11-10 09:47:40 | 1 | Other |
| 1260 | 1143 | 4 | 2015-11-10 09:47:42 | 1 | Other |
| 1261 | 1148 | 4 | 2015-11-10 09:47:48 | 1 | Other |
| 1262 | 1146 | 4 | 2015-11-10 09:47:58 | 1 | Other |
| 1263 | 1153 | 4 | 2015-11-10 09:48:00 | 1 | Other |
| 1264 | 1154 | 4 | 2015-11-10 09:48:05 | 1 | Other |
| 1265 | 1156 | 4 | 2015-11-10 09:48:36 | 1 | Other |
| 1266 | 1145 | 4 | 2015-11-10 09:48:50 | 1 | Other |
| 1267 | 1147 | 4 | 2015-11-10 09:48:54 | 1 | Other |
| 1268 | 1160 | 4 | 2015-11-10 09:49:00 | 1 | Other |
| 1269 | 1155 | 4 | 2015-11-10 09:49:10 | 1 | Other |
| 1270 | 1151 | 4 | 2015-11-10 09:49:26 | 1 | Other |
| 1271 | 1152 | 4 | 2015-11-10 09:49:37 | 1 | Other |
| 1272 | 1159 | 4 | 2015-11-10 09:49:42 | 1 | Other |
| 1273 | 1172 | 4 | 2015-11-10 09:50:06 | 1 | Other |
| 1274 | 1173 | 4 | 2015-11-10 09:50:12 | 1 | Other |
| 1275 | 1150 | 4 | 2015-11-10 09:50:15 | 1 | Other |
Table definition
CREATE TABLE entry_scan (
scan_id INTEGER PRIMARY KEY,
ticket_id INTEGER NOT NULL REFERENCES ticket (ticket_id),
entrance_id INTEGER NOT NULL REFERENCES entrance (entrance_id),
scanned_at TEXT NOT NULL,
is_first_entry INTEGER NOT NULL CHECK (is_first_entry IN (0, 1)),
transport_mode TEXT CHECK (transport_mode IN ('Walk', 'Metro', 'Train', 'Bus', 'Taxi', 'Private Vehicle', 'Other')),
CHECK ((is_first_entry = 1) = (transport_mode IS NOT NULL))
) STRICT;