diff --git a/src/database/mod.rs b/src/database/mod.rs index 02d976e..04884bc 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -37,6 +37,16 @@ pub fn initialize_database( [], )?; + connection.execute( + "CREATE TABLE IF NOT EXISTS albums ( + name TEXT NOT NULL, + artist_id INTEGER NOT NULL, + PRIMARY KEY (name, artist_id), + FOREIGN KEY (artist_id) REFERENCES artists (id) ON DELETE CASCADE + )", + [], + )?; + connection.execute( " CREATE TABLE IF NOT EXISTS tracks (