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,276–1,300 of 9,738
| scan_idINTEGER | ticket_id→ ticket.ticket_id | entrance_id→ entrance.entrance_id | scanned_atTEXT | is_first_entryINTEGER | transport_modeTEXT |
|---|---|---|---|---|---|
| 1276 | 1170 | 4 | 2015-11-10 09:50:28 | 1 | Other |
| 1277 | 1165 | 4 | 2015-11-10 09:50:30 | 1 | Other |
| 1278 | 1157 | 4 | 2015-11-10 09:50:54 | 1 | Other |
| 1279 | 1174 | 4 | 2015-11-10 09:50:56 | 1 | Other |
| 1280 | 1163 | 4 | 2015-11-10 09:51:38 | 1 | Other |
| 1281 | 1166 | 4 | 2015-11-10 09:51:40 | 1 | Other |
| 1282 | 1161 | 4 | 2015-11-10 09:51:42 | 1 | Other |
| 1283 | 1158 | 4 | 2015-11-10 09:51:52 | 1 | Other |
| 1284 | 1169 | 4 | 2015-11-10 09:53:06 | 1 | Other |
| 1285 | 1162 | 4 | 2015-11-10 09:53:15 | 1 | Other |
| 1286 | 1164 | 4 | 2015-11-10 09:53:16 | 1 | Other |
| 1287 | 1171 | 4 | 2015-11-10 09:53:30 | 1 | Other |
| 1288 | 1167 | 4 | 2015-11-10 09:54:30 | 1 | Other |
| 1289 | 1422 | 5 | 2015-11-10 13:44:29 | 1 | Other |
| 1290 | 1421 | 5 | 2015-11-10 13:44:46 | 1 | Other |
| 1291 | 1423 | 5 | 2015-11-10 13:44:51 | 1 | Other |
| 1292 | 1352 | 1 | 2015-11-12 10:30:19 | 1 | Walk |
| 1293 | 1351 | 1 | 2015-11-12 10:30:24 | 1 | Walk |
| 1294 | 1444 | 1 | 2015-11-12 11:37:36 | 1 | Walk |
| 1295 | 1446 | 1 | 2015-11-12 11:37:49 | 1 | Walk |
| 1296 | 1442 | 1 | 2015-11-12 11:38:00 | 1 | Walk |
| 1297 | 1445 | 1 | 2015-11-12 11:38:06 | 1 | Walk |
| 1298 | 1443 | 1 | 2015-11-12 11:38:15 | 1 | Walk |
| 1299 | 1425 | 1 | 2015-11-12 13:52:03 | 1 | Bus |
| 1300 | 1424 | 1 | 2015-11-12 13:52:18 | 1 | Bus |
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;