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

Playlist: Remove UNIQUE constraint on name

refs #36
parent 6e0802b0
......@@ -239,7 +239,7 @@ void Playlist::createTable( sqlite::Connection* dbConn )
{
const std::string req = "CREATE TABLE IF NOT EXISTS " + policy::PlaylistTable::Name + "("
+ policy::PlaylistTable::PrimaryKeyColumn + " INTEGER PRIMARY KEY AUTOINCREMENT,"
"name TEXT UNIQUE,"
"name TEXT,"
"file_id UNSIGNED INT DEFAULT NULL,"
"creation_date UNSIGNED INT NOT NULL,"
"artwork_mrl TEXT,"
......
......@@ -53,7 +53,8 @@ TEST_F( Playlists, Create )
TEST_F( Playlists, CreateDuplicate )
{
auto p = ml->createPlaylist(pl->name());
ASSERT_EQ( nullptr, p );
ASSERT_NE( nullptr, p );
ASSERT_NE( p->id(), pl->id() );
}
TEST_F( Playlists, Fetch )
......
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