store annotations in db and sync with peers
This commit is contained in:
parent
131a6a3215
commit
e0cba14d6a
21 changed files with 385 additions and 63 deletions
16
oml/setup.py
16
oml/setup.py
|
|
@ -151,6 +151,22 @@ CREATE TABLE listitem (
|
|||
FOREIGN KEY(item_id) REFERENCES item (id),
|
||||
FOREIGN KEY(list_id) REFERENCES list (id)
|
||||
);
|
||||
CREATE TABLE annotation (
|
||||
_id INTEGER NOT NULL,
|
||||
id VARCHAR(43),
|
||||
created DATETIME,
|
||||
modified DATETIME,
|
||||
user_id VARCHAR(43),
|
||||
item_id VARCHAR(43),
|
||||
data BLOB,
|
||||
findquotes TEXT,
|
||||
findnotes TEXT,
|
||||
PRIMARY KEY (_id),
|
||||
FOREIGN KEY(user_id) REFERENCES user (id),
|
||||
FOREIGN KEY(item_id) REFERENCES item (id)
|
||||
);
|
||||
CREATE INDEX ix_annotation_findquotes ON annotation (findquotes);
|
||||
CREATE INDEX ix_annotation_findnotes ON annotation (findnotes);
|
||||
PRAGMA journal_mode=WAL
|
||||
'''
|
||||
for statement in sql.split(';'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue