No-Intro: Index database on MD5 and SHA1 too

This commit is contained in:
Vicki Pfau 2024-08-11 23:22:13 -07:00
parent b12858e974
commit 17cf2e6237
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ struct NoIntroDB* NoIntroDBLoad(const char* path) {
"flags INTEGER DEFAULT 0,"
"gid INTEGER NOT NULL REFERENCES games(gid) ON DELETE CASCADE"
");\n"
"CREATE INDEX IF NOT EXISTS crc32 ON roms (crc32);";
"CREATE INDEX IF NOT EXISTS crc32 ON roms (crc32);\n"
"CREATE INDEX IF NOT EXISTS md5 ON roms (md5);\n"
"CREATE INDEX IF NOT EXISTS sha1 ON roms (sha1);\n";
if (sqlite3_exec(db->db, createTables, NULL, NULL, NULL)) {
goto error;
}