b1f46ed830
* Migrate History screen database call to SQLDelight - Move all migrations to SQLDelight - Move all tables to SQLDelight Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com> * Changes from review comments * Add adapters to database * Remove logging of database version in App * Change query name for paging source queries * Update migrations * Make SQLite Callback handle migration - To ensure it updates the database * Use SQLDelight Schema version for Callback database version Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
10 lines
342 B
Plaintext
10 lines
342 B
Plaintext
CREATE TABLE history(
|
|
history_id INTEGER NOT NULL PRIMARY KEY,
|
|
history_chapter_id INTEGER NOT NULL UNIQUE,
|
|
history_last_read INTEGER,
|
|
history_time_read INTEGER,
|
|
FOREIGN KEY(history_chapter_id) REFERENCES chapters (_id)
|
|
ON DELETE CASCADE
|
|
);
|
|
|
|
CREATE INDEX history_history_chapter_id_index ON history(history_chapter_id); |