Skip to content

Commit

Permalink
Develop (#129)
Browse files Browse the repository at this point in the history
* chore: release v0.4.1-hotfix.3

* fix(data-migration): early return if no categories have parents (#128)

Signed-off-by: Robert Goniszewski <[email protected]>

---------

Signed-off-by: Robert Goniszewski <[email protected]>
  • Loading branch information
goniszewski authored Sep 23, 2024
1 parent c075152 commit bd37a73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grimoire",
"version": "0.4.1-hotfix.2",
"version": "0.4.1-hotfix.3",
"description": "Bookmark manager for the wizards 🧙",
"author": "Robert Goniszewski <[email protected]>",
"main": "./build/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/lib/utils/data-migration/migrate-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ async function migrateCategories(

// Update parentId of categories that have a parentId
const categoriesWithParentId = categories.filter((c) => c.parent);
if (categoriesWithParentId.length === 0) {
return mappedIds;
}

await targetDbClient
.update(categorySchema)
.set({
Expand Down

0 comments on commit bd37a73

Please sign in to comment.