mirror of
https://github.com/mihonapp/mihon.git
synced 2024-10-24 21:12:35 -04:00
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>
18 lines
No EOL
581 B
Text
18 lines
No EOL
581 B
Text
CREATE TABLE manga_sync(
|
|
_id INTEGER NOT NULL PRIMARY KEY,
|
|
manga_id INTEGER NOT NULL,
|
|
sync_id INTEGER NOT NULL,
|
|
remote_id INTEGER NOT NULL,
|
|
library_id INTEGER,
|
|
title TEXT NOT NULL,
|
|
last_chapter_read REAL NOT NULL,
|
|
total_chapters INTEGER NOT NULL,
|
|
status INTEGER NOT NULL,
|
|
score REAL AS Float NOT NULL,
|
|
remote_url TEXT NOT NULL,
|
|
start_date INTEGER AS Long NOT NULL,
|
|
finish_date INTEGER AS Long NOT NULL,
|
|
UNIQUE (manga_id, sync_id) ON CONFLICT REPLACE,
|
|
FOREIGN KEY(manga_id) REFERENCES mangas (_id)
|
|
ON DELETE CASCADE
|
|
); |