note_id - parent_note_id index needs to be unique

This commit is contained in:
azivner
2018-01-02 19:20:42 -05:00
parent 361d8a4216
commit 53ee1fa5ed
3 changed files with 8 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ CREATE INDEX `IDX_notes_is_deleted` ON `notes` (
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
`note_tree_id`
);
CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
CREATE UNIQUE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
`note_id`,
`parent_note_id`
);