mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
note_id - parent_note_id index needs to be unique
This commit is contained in:
@@ -70,7 +70,7 @@ CREATE INDEX `IDX_notes_is_deleted` ON `notes` (
|
|||||||
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
|
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
|
||||||
`note_tree_id`
|
`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`,
|
`note_id`,
|
||||||
`parent_note_id`
|
`parent_note_id`
|
||||||
);
|
);
|
||||||
|
|||||||
6
migrations/0061__change_index_to_unique.sql
Normal file
6
migrations/0061__change_index_to_unique.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
DROP INDEX IDX_notes_tree_note_id_parent_note_id;
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
|
||||||
|
`note_id`,
|
||||||
|
`parent_note_id`
|
||||||
|
);
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
const build = require('./build');
|
const build = require('./build');
|
||||||
const packageJson = require('../package');
|
const packageJson = require('../package');
|
||||||
|
|
||||||
const APP_DB_VERSION = 60;
|
const APP_DB_VERSION = 61;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
app_version: packageJson.version,
|
app_version: packageJson.version,
|
||||||
|
|||||||
Reference in New Issue
Block a user