mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 23:06:11 +00:00
Drop the migration and the multi_file / top_level_file_count columns on roms; express both as deferred column_property correlated subqueries against rom_files instead. The gallery list and detail queries opt in via undefer, so they get the values computed in the same SELECT via indexed subqueries (rom_id index already in place); other code paths that don't read the flags pay nothing. This keeps the gallery perf win (no rom_files load for cards) without introducing schema state that has to stay in sync with rom_files at write time.