-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated readme and document database schema
- Loading branch information
1 parent
6efe9ec
commit c662226
Showing
4 changed files
with
75 additions
and
6 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
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,3 +1,67 @@ | ||
# Manga-tui sqlite database | ||
|
||
# app_version | ||
|
||
This table is used to keep track of what version the user has installed on their machines, maybe this will be useful for future updates idk | ||
|
||
- version | ||
- type: TEXT PRIMARY KEY | ||
|
||
|
||
# history_types | ||
|
||
The types of history, which are : `ReadingHistory` and `PlanToRead` | ||
|
||
- id | ||
- type: INTEGER PRIMARY KEY AUTOINCREMENT | ||
- name | ||
- type: TEXT NOT NULL UNIQUE | ||
|
||
# mangas | ||
|
||
To store which mangas the user is reading | ||
|
||
- id | ||
- type : TEXT PRIMARY KEY | ||
- title | ||
- type: TEXT NOT NULL, | ||
- created_at | ||
- type: DATETIME DEFAULT (datetime('now')) | ||
- updated_at | ||
- type: DATETIME DEFAULT (datetime('now')) | ||
- last_read | ||
- type: DATETIME DEFAULT (datetime('now')) | ||
- deleted_at | ||
- type: DATETIME NULL | ||
- img_url | ||
- type: TEXT NULL | ||
|
||
# chapters | ||
|
||
To know which chapters the user has read | ||
|
||
- id | ||
- type: TEXT PRIMARY KEY | ||
- title | ||
- type: TEXT NOT NULL | ||
- manga_id | ||
- type: TEXT NOT NULL | ||
- is_read | ||
- type: BOOLEAN NOT NULL DEFAULT 0 | ||
- is_downloaded | ||
- type: BOOLEAN NOT NULL DEFAULT 0 | ||
|
||
FOREIGN KEY (manga_id) REFERENCES mangas (id) | ||
|
||
# manga_history_union | ||
|
||
To query mangas that are in reading history or plan to read | ||
|
||
- manga_id | ||
- type: TEXT | ||
- type_id | ||
- type: INTEGER | ||
|
||
PRIMARY KEY (manga_id, type_id), | ||
FOREIGN KEY (manga_id) REFERENCES mangas (id), | ||
FOREIGN KEY (type_id) REFERENCES history_types (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