Skip to content

Commit

Permalink
Actually fix test by uploading migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
xBaank committed Aug 14, 2024
1 parent c6f3d1d commit b11084c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ bld/
*.dylib
*.a

## migrations, they are autogenerated on build and publsish
*.sql

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand Down
31 changes: 31 additions & 0 deletions Console/Scripts/Migrations/2024081401_Initial.sql
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)
);

0 comments on commit b11084c

Please sign in to comment.