Skip to content

Commit

Permalink
chore: fixed add view details permission migration for local environm…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
apsantiso committed Feb 6, 2025
1 parent 9ab2cb7 commit 5191e5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions migrations/20250128142106-add-view-details-to-permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ module.exports = {

return permission;
});

await queryInterface.bulkInsert('permissions', permissions);
// Sequelize / DB fails if we pass empty array to inserts. Local environments do not have type column
if (permissions.length > 0) {
await queryInterface.bulkInsert('permissions', permissions);
}
},

async down(queryInterface, Sequelize) {
Expand Down

0 comments on commit 5191e5f

Please sign in to comment.