Commit 8ef76c00 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Album: artist_id is a foreign key

parent a2da976e
...@@ -239,7 +239,9 @@ bool Album::createTable(DBConnection dbConnection ) ...@@ -239,7 +239,9 @@ bool Album::createTable(DBConnection dbConnection )
"artwork_mrl TEXT," "artwork_mrl TEXT,"
"last_sync_date UNSIGNED INTEGER," "last_sync_date UNSIGNED INTEGER,"
"nb_tracks UNSIGNED INTEGER DEFAULT 0," "nb_tracks UNSIGNED INTEGER DEFAULT 0,"
"is_present BOOLEAN NOT NULL DEFAULT 1" "is_present BOOLEAN NOT NULL DEFAULT 1,"
"FOREIGN KEY( artist_id ) REFERENCES " + policy::ArtistTable::Name
+ "(id_artist) ON DELETE CASCADE"
")"; ")";
static const std::string reqRel = "CREATE TABLE IF NOT EXISTS AlbumArtistRelation(" static const std::string reqRel = "CREATE TABLE IF NOT EXISTS AlbumArtistRelation("
"id_album INTEGER," "id_album INTEGER,"
......
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