arkon 2b79295240 Revert "Revert history Compose/SQLDelight changes"
This reverts commit 96c894ce5b3be545f3ea7df057d6dfed9fca3696.
2022-04-22 17:35:18 -04:00

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);