01e2db1f52
Allows to save media in a different path than the state store. This adds a "last_access" field to the SQLite implementation, to prepare for future work on a media retention policy. This removes the IndexedDB media cache implementation, because as far as I know it is currently unused, and I have no idea how to implement efficiently the planned media retention policy with a key-value store. Closes #1810. - [x] Public API changes documented in changelogs (optional) --------- Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
15 lines
327 B
SQL
15 lines
327 B
SQL
-- basic kv metadata like the database version and store cipher
|
|
CREATE TABLE "kv" (
|
|
"key" TEXT PRIMARY KEY NOT NULL,
|
|
"value" BLOB NOT NULL
|
|
);
|
|
|
|
CREATE TABLE "media" (
|
|
"uri" BLOB NOT NULL,
|
|
"format" BLOB NOT NULL,
|
|
"data" BLOB NOT NULL,
|
|
"last_access" INTEGER NOT NULL,
|
|
|
|
PRIMARY KEY ("uri", "format")
|
|
);
|