mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
98a446a7c0
Migration20200101042200 wrote 86 indexes by hand so that deleting a trip or a user stops scanning every child table while it holds the single connection. Nothing kept it that way: the next table with an unindexed trip_id would bring the scans back, and the entity parity tests compare index names, not whether a key is covered. The test reads PRAGMA foreign_key_list off the migrated test database and requires the columns of each foreign key to lead some index or the primary key. Today every one does, so the allow-list for deliberate exceptions starts empty, and a second case keeps that list honest. A third builds a small schema to prove the check fails on an unindexed key, a composite one, and an index that holds the column second.