-
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.
- Loading branch information
Showing
14 changed files
with
536 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
app.env = development | ||
APP_ENV = development | ||
SONG_SPOTIFY_CLIENT_ID = your_client_id | ||
SONG_SPOTIFY_CLIENT_SECRET = your_client_secret |
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
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,45 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
ALTER TABLE song | ||
DROP COLUMN artists; | ||
|
||
CREATE TABLE IF NOT EXISTS song_genre ( | ||
id INTEGER PRIMARY KEY, | ||
genre TEXT NOT NULL | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS song_artist ( | ||
id INTEGER PRIMARY KEY, | ||
name TEXT NOT NULL, | ||
spotify_id TEXT NOT NULL, | ||
followers INTEGER NOT NULL, | ||
popularity INTEGER NOT NULL | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS song_artist_song ( | ||
id INTEGER PRIMARY KEY, | ||
artist_id INTEGER NOT NULL, | ||
song_id INTEGER NOT NULL, | ||
FOREIGN KEY(artist_id) REFERENCES artist(id), | ||
FOREIGN KEY(song_id) REFERENCES song(id) | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS song_artist_genre ( | ||
id INTEGER PRIMARY KEY, | ||
artist_id INTEGER NOT NULL, | ||
genre_id INTEGER NOT NULL, | ||
FOREIGN KEY(artist_id) REFERENCES artist(id), | ||
FOREIGN KEY(genre_id) REFERENCES genre(id) | ||
); | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP TABLE IF EXISTS song_artist_genre; | ||
DROP TABLE IF EXISTS song_artist_song; | ||
DROP TABLE IF EXISTS song_artist; | ||
DROP TABLE IF EXISTS song_genre; | ||
|
||
ALTER TABLE song | ||
ADD COLUMN artists TEXT NOT NULL DEFAULT 'Unknown'; | ||
-- +goose StatementEnd |
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 was deleted.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.