feat(db): add albums table
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user