Files
notesnook/packages/core/migrations.js

38 lines
743 B
JavaScript
Raw Normal View History

export const migrations = {
2020-12-07 13:11:44 +05:00
4: {
note: function (item) {
if (item.notebooks && item.notebooks.every((n) => !n.id)) {
item.notebooks = undefined;
}
return migrations["4.1"].note(item);
},
},
4.1: {
note: function (item) {
return migrations["4.2"].note(item);
},
},
4.2: {
note: function (item) {
if (item.notebooks) {
item.notebooks = item.notebooks.map((nb) => {
return { id: nb.id, topics: nb.topics || [nb.topic] };
});
}
item.migrated = true;
return item;
},
2021-02-12 09:49:17 +05:00
},
2021-10-23 10:59:03 +05:00
4.3: {},
5.0: {},
5.1: {},
5.2: {
note: false,
2020-12-07 13:11:44 +05:00
notebook: false,
tag: false,
trash: false,
tiny: false,
settings: false,
},
};