mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
19 lines
430 B
JavaScript
19 lines
430 B
JavaScript
|
|
module.exports = {
|
|
up: (queryInterface, Sequelize) => {
|
|
// return Promise.resolve(1)
|
|
return queryInterface.addColumn('events', 'parentId', {
|
|
type: Sequelize.INTEGER,
|
|
references: {
|
|
model: 'events',
|
|
key: 'id'
|
|
},
|
|
onUpdate: 'CASCADE',
|
|
onDelete: 'SET NULL'
|
|
})
|
|
},
|
|
|
|
down: (queryInterface, Sequelize) => {
|
|
return queryInterface.removeColumn('events', 'parentId')
|
|
}
|
|
}
|