diff --git a/src/database/migrations/20241208081622-add-status-to-userChallenge.js b/src/database/migrations/20241208081622-add-status-to-userChallenge.js index 3955ba0..3e62e2e 100644 --- a/src/database/migrations/20241208081622-add-status-to-userChallenge.js +++ b/src/database/migrations/20241208081622-add-status-to-userChallenge.js @@ -13,11 +13,15 @@ module.exports = { }); const currentDate = new Date(); - const currentMonth = currentDate.getMonth(); + const currentMonth = currentDate.getMonth() + 1; const currentYear = currentDate.getFullYear(); + console.log(currentMonth); + const formattedCurrentMonth = ('0' + currentMonth).slice(-2); + console.log(formattedCurrentMonth); + await queryInterface.bulkUpdate( 'userChallenge', { status: 'ACTIVE' },