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

@@ -19,7 +19,7 @@ router.get('/', auth.checkApiAuth, async (req, res, next) => {
+ "FROM notes_tree "
+ "JOIN notes ON notes.note_id = notes_tree.note_id "
+ "WHERE notes.is_deleted = 0 AND notes_tree.is_deleted = 0 "
+ "ORDER BY note_pos");
+ "ORDER BY note_position");
const dataKey = protected_session.getDataKey(req);