From b6f7c604c763da19a0a82f3c4209ea0fa258be65 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 24 Dec 2022 12:54:17 +0100 Subject: [PATCH] fix share migration --- db/migrations/0199__rename_ids.sql | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/db/migrations/0199__rename_ids.sql b/db/migrations/0199__rename_ids.sql index 1de3324a9..ca1ed273e 100644 --- a/db/migrations/0199__rename_ids.sql +++ b/db/migrations/0199__rename_ids.sql @@ -42,3 +42,12 @@ UPDATE branches SET parentNoteId = '_search' WHERE parentNoteId = 'search'; UPDATE attributes SET noteId = '_search' WHERE noteId = 'search'; UPDATE attributes SET value = '_search' WHERE type = 'relation' AND value = 'search'; UPDATE entity_changes SET entityId = '_search' WHERE entityId = 'search'; + +UPDATE notes SET noteId = '_share', title = 'Shared Notes' WHERE noteId = 'share'; +UPDATE note_contents SET noteId = '_share' WHERE noteId = 'share'; +UPDATE note_revisions SET noteId = '_share' WHERE noteId = 'share'; +UPDATE branches SET noteId = '_share' WHERE noteId = 'share'; +UPDATE branches SET parentNoteId = '_share' WHERE parentNoteId = 'share'; +UPDATE attributes SET noteId = '_share' WHERE noteId = 'share'; +UPDATE attributes SET value = '_share' WHERE type = 'relation' AND value = 'share'; +UPDATE entity_changes SET entityId = '_share' WHERE entityId = 'share';