Commit d5ed4951 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

AlbumTrack: Index foreign keys

parent 648c5ff9
......@@ -111,8 +111,10 @@ void AlbumTrack::createTable( sqlite::Connection* dbConnection )
"FOREIGN KEY (album_id) REFERENCES Album(id_album) "
" ON DELETE CASCADE"
")";
const std::string indexAlbumIdReq = "CREATE INDEX IF NOT EXISTS album_track_album_genre_artist_ids "
"ON " + policy::AlbumTrackTable::Name + "(album_id, genre_id, artist_id)";
sqlite::Tools::executeRequest( dbConnection, req );
sqlite::Tools::executeRequest( dbConnection, indexAlbumIdReq );
}
void AlbumTrack::createTriggers(sqlite::Connection* dbConnection)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment