-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added proper database setup via migrations; removed DATABASE_URL sett…
…ing; WARNING: recreation of the database is necessary, just delete the "./db/" directory
- Loading branch information
Showing
9 changed files
with
142 additions
and
160 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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 TABLE Hentai | ||
( | ||
id INTEGER NOT NULL, | ||
cover_type TEXT NOT NULL, | ||
media_id INTEGER NOT NULL, | ||
num_favorites INTEGER NOT NULL, | ||
num_pages INTEGER NOT NULL, | ||
page_types TEXT NOT NULL, | ||
scanlator TEXT, | ||
title_english TEXT, | ||
title_japanese TEXT, | ||
title_pretty TEXT, | ||
upload_date TEXT NOT NULL, | ||
PRIMARY KEY(id) | ||
); | ||
CREATE TABLE Tag | ||
( | ||
id INTEGER NOT NULL, | ||
name TEXT NOT NULL, | ||
type TEXT NOT NULL, | ||
url TEXT NOT NULL, | ||
PRIMARY KEY(id) | ||
); | ||
CREATE TABLE Hentai_Tag | ||
( | ||
hentai_id INTEGER NOT NULL, | ||
tag_id INTEGER NOT NULL, | ||
PRIMARY KEY(hentai_id, tag_id), | ||
FOREIGN KEY(hentai_id) REFERENCES Hentai(id), | ||
FOREIGN KEY(tag_id) REFERENCES Tag(id) | ||
); |
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
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