Put all directories and images in database, use the info to associate an image to each artist
This commit is contained in:
@@ -18,8 +18,14 @@
|
||||
*/
|
||||
|
||||
#include "Common.hpp"
|
||||
|
||||
#include "core/String.hpp"
|
||||
#include "database/Db.hpp"
|
||||
#include "database/Directory.hpp"
|
||||
#include "database/Image.hpp"
|
||||
#include "database/StarredArtist.hpp"
|
||||
#include "database/StarredRelease.hpp"
|
||||
#include "database/StarredTrack.hpp"
|
||||
|
||||
namespace lms::db::tests
|
||||
{
|
||||
@@ -318,5 +324,24 @@ VALUES
|
||||
|
||||
// Now perform full migration
|
||||
db.getTLSSession().migrateSchemaIfNeeded();
|
||||
|
||||
// Now perform some dummy finds to ensure all fields are correctly mapped
|
||||
{
|
||||
auto transaction{ session.createReadTransaction() };
|
||||
|
||||
EXPECT_FALSE(Artist::find(session, ArtistId{}));
|
||||
EXPECT_FALSE(Cluster::find(session, ClusterId{}));
|
||||
EXPECT_FALSE(ClusterType::find(session, ClusterTypeId{}));
|
||||
EXPECT_FALSE(Directory::find(session, DirectoryId{}));
|
||||
EXPECT_FALSE(Image::find(session, ImageId{}));
|
||||
EXPECT_FALSE(Listen::find(session, ListenId{}));
|
||||
EXPECT_FALSE(Release::find(session, ReleaseId{}));
|
||||
EXPECT_FALSE(StarredArtist::find(session, StarredArtistId{}));
|
||||
EXPECT_FALSE(StarredRelease::find(session, StarredReleaseId{}));
|
||||
EXPECT_FALSE(StarredTrack::find(session, StarredTrackId{}));
|
||||
EXPECT_FALSE(Track::find(session, TrackId{}));
|
||||
EXPECT_FALSE(TrackList::find(session, TrackListId{}));
|
||||
EXPECT_FALSE(User::find(session, UserId{}));
|
||||
}
|
||||
}
|
||||
} // namespace lms::db::tests
|
||||
Reference in New Issue
Block a user