View Single Post
Old 04-09-2025, 08:46 AM   #7
rantanplan
Weirdo
rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.
 
Posts: 957
Karma: 12499004
Join Date: Nov 2019
Location: Wuppertal, Germany
Device: Kobo Sage, Kobo Libra 2, Kindle Paperwhite 2021, Kindle Scribe 2022
The koreader sync server only stores one record per document. So essentially, the data that is stored for one document is literally byte-sized:

Code:
CREATE TABLE users (
  id BIGSERIAL PRIMARY KEY,
  username TEXT UNIQUE NOT NULL,
  password TEXT
);

CREATE TABLE progresses (
  id BIGSERIAL PRIMARY KEY,
  user_id BIGINT NOT NULL,
  document TEXT NOT NULL,
  progress TEXT NOT NULL,
  percentage REAL NOT NULL,
  device TEXT NOT NULL,
  device_id TEXT NOT NULL,
  timestamp BIGINT NOT NULL,
  FOREIGN KEY (user_id)
     REFERENCES users(id) ON DELETE CASCADE,
  UNIQUE (user_id, document)
);
rantanplan is offline   Reply With Quote