-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actually fix test by uploading migrations
- Loading branch information
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- Create Settings table | ||
CREATE TABLE IF NOT EXISTS Settings ( | ||
Id INTEGER PRIMARY KEY AUTOINCREMENT, | ||
Volume INTEGER NOT NULL | ||
); | ||
|
||
-- Create Playlists table | ||
CREATE TABLE IF NOT EXISTS Playlists ( | ||
PlaylistId INTEGER PRIMARY KEY AUTOINCREMENT, | ||
Name TEXT NOT NULL | ||
); | ||
|
||
-- Create Songs table | ||
CREATE TABLE IF NOT EXISTS Songs ( | ||
Id TEXT PRIMARY KEY, | ||
Title TEXT NOT NULL, | ||
ChannelTitle TEXT, | ||
ChannelId TEXT, | ||
DurationMiliseconds REAL, | ||
Url TEXT | ||
); | ||
|
||
-- Create PlaylistSongs table | ||
CREATE TABLE IF NOT EXISTS PlaylistSongs ( | ||
PlaylistId INTEGER NOT NULL, | ||
SongId TEXT NOT NULL, | ||
[Order] INTEGER NOT NULL, | ||
FOREIGN KEY (PlaylistId) REFERENCES Playlists (PlaylistId), | ||
FOREIGN KEY (SongId) REFERENCES Songs (Id), | ||
PRIMARY KEY (PlaylistId, SongId) | ||
); |