mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
25 lines
644 B
JavaScript
25 lines
644 B
JavaScript
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
return Promise.all(
|
|
[
|
|
await queryInterface.addColumn('events', 'media', { type: Sequelize.JSON }),
|
|
await queryInterface.sequelize.query("UPDATE events set media=JSON('[{ \"url\": \"' || image_path || '\" }]')")
|
|
])
|
|
/**
|
|
* Add altering commands here.
|
|
*
|
|
* Example:
|
|
* await queryInterface.createTable('users', { id: Sequelize.INTEGER });
|
|
*/
|
|
},
|
|
|
|
down: async (queryInterface, Sequelize) => {
|
|
/**
|
|
* Add reverting commands here.
|
|
*
|
|
* Example:
|
|
* await queryInterface.dropTable('users');
|
|
*/
|
|
}
|
|
}
|