fix migration
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
const { event: Event } = require('../api/models')
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
const events = await Event.findAll({})
|
||||
const promises = events.map(e => {
|
||||
return e.update({ recurrent: JSON.parse(e.recurrent) })
|
||||
})
|
||||
return Promise.all(promises)
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
const events = await Event.findAll({})
|
||||
const promises = events.map(e => {
|
||||
return e.update({ recurrent: JSON.stringify(e.recurrent) })
|
||||
})
|
||||
return Promise.all(promises)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user