added foreign keys to relations to guarantee data consistency

This commit is contained in:
azivner
2017-12-19 21:40:48 -05:00
parent bb2f47deb2
commit 72712bc24b
17 changed files with 171 additions and 66 deletions

View File

@@ -37,8 +37,8 @@ const dbReady = new Promise((resolve, reject) => {
await insert('notes_tree', {
note_tree_id: utils.newNoteTreeId(),
note_id: noteId,
note_pid: 'root',
note_pos: 1,
parent_note_id: 'root',
note_position: 1,
is_deleted: 0,
date_modified: now
});