Skip to content

Build your personal knowledge base with Trilium Notes

fix migration

zadam6e33553146f5
diff --git a/db/migrations/0215__content_structure.sql b/db/migrations/0215__content_structure.sql
index f8c6a461fb..da4afcf6bf 100644
--- a/db/migrations/0215__content_structure.sql
+++ b/db/migrations/0215__content_structure.sql
@@ -10,4 +10,4 @@ ALTER TABLE notes ADD blobId TEXT DEFAULT NULL;
ALTER TABLE note_revisions ADD blobId TEXT DEFAULT NULL;
CREATE INDEX IF NOT EXISTS IDX_notes_blobId on notes (blobId);
-CREATE INDEX IF NOT EXISTS IDX_revisions_blobId on revisions (blobId);
+CREATE INDEX IF NOT EXISTS IDX_note_revisions_blobId on note_revisions (blobId);
diff --git a/db/migrations/0218__rename_note_revision_to_revision.sql b/db/migrations/0218__rename_note_revision_to_revision.sql
index 7800998728..c67c523939 100644
--- a/db/migrations/0218__rename_note_revision_to_revision.sql
+++ b/db/migrations/0218__rename_note_revision_to_revision.sql
@@ -21,5 +21,6 @@ CREATE INDEX `IDX_revisions_utcDateCreated` ON `revisions` (`utcDateCreated`);
CREATE INDEX `IDX_revisions_utcDateLastEdited` ON `revisions` (`utcDateLastEdited`);
CREATE INDEX `IDX_revisions_dateCreated` ON `revisions` (`dateCreated`);
CREATE INDEX `IDX_revisions_dateLastEdited` ON `revisions` (`dateLastEdited`);
+CREATE INDEX IF NOT EXISTS IDX_revisions_blobId on revisions (blobId);
UPDATE entity_changes SET entityName = 'revisions' WHERE entityName = 'note_revisions';
diff --git a/src/services/migration.js b/src/services/migration.js
index e5ca3dc6c0..4a1f727b09 100644
--- a/src/services/migration.js
+++ b/src/services/migration.js
@@ -11,7 +11,7 @@ async function migrate() {
const currentDbVersion = getDbVersion();
if (currentDbVersion < 214) {
- log.error("Direct migration from your current version is not supported. Please upgrade to the latest v0.60.X first and only then to this version.");
+ log.error("Direct migration from your current version is not supported. Please upgrade to the latest v0.60.4 first and only then to this version.");
utils.crash();
return;
@@ -19,7 +19,7 @@ async function migrate() {
// backup before attempting migration
await backupService.backupNow(
- // creating a special backup for versions 0.60.X, the changes in 0.61 are major.
+ // creating a special backup for version 0.60.4, the changes in 0.61 are major.
currentDbVersion === 214
? `before-migration-v060`
: 'before-migration'