sequelize migration add column
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.sequelize.transaction((t) => {
return Promise.all([
queryInterface.addColumn('table_name', 'field_one_name', {
type: Sequelize.STRING
}, { transaction: t }),
queryInterface.addColumn('table_name', 'field_two_name', {
type: Sequelize.STRING,
}, { transaction: t })
])
})
},
down: (queryInterface, Sequelize) => {
return queryInterface.sequelize.transaction((t) => {
return Promise.all([
queryInterface.removeColumn('table_name', 'field_one_name', { transaction: t }),
queryInterface.removeColumn('table_name', 'field_two_name', { transaction: t })
])
})
}
};
Also in JavaScript:
- find element in array underscore js
- how to use algolia react native
- react native text ellipsis
- async await javascript stack overflow
- three dots in javascript
- locak storage for table\ js
- javascript store array in localstorage
- import all from javascript
- redux saga fetch data using axios
- react native link fonts
- isnan in javascript
- react cheat sheets
- regex optional whitespace characters
- jquery get current row value
- how to check if a string is alphabetic in javascript
- mongodb add user
- JQuery UI Saving Sortable List
- call laravel route js
- jquery create element properties
- node import all functions from file
- mdb nextjs
- script defer src= /js/inviteapi.min.js /script
- javascript charcode
- class declaration in javascript