mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
fix migration
This commit is contained in:
parent
4f3448332b
commit
7dd1f76ccf
2 changed files with 1 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "gancio",
|
"name": "gancio",
|
||||||
"version": "0.21.0",
|
"version": "0.22.1",
|
||||||
"description": "A shared agenda for local communities",
|
"description": "A shared agenda for local communities",
|
||||||
"author": "lesion",
|
"author": "lesion",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -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)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue