1
0
Fork 0

Reworked the systems handling and caching with sqlite

This commit is contained in:
Julien Dessaux 2023-05-31 01:19:31 +02:00
parent afe2db8a35
commit 61b5c8493e
Signed by: adyxax
GPG key ID: F92E51B86E07177E
4 changed files with 129 additions and 46 deletions

View file

@ -1,6 +1,6 @@
CREATE TABLE systems (
id INTEGER PRIMARY KEY,
symbol TEXT NOT NULL UNIQUE,
data TEXT NOT NULL,
updated DATE DEFAULT (datetime('now'))
data JSON NOT NULL,
updated DATE DEFAULT NULL
);
CREATE UNIQUE INDEX systems_data_symbol on systems (json_extract(data, '$.symbol'));