Answers for "sequelize add not null constraint"

0

sequelize add not null constraint

module.exports = {
    up: (queryInterface, Sequelize) => {
        return queryInterface.changeColumn('users', 'active', {
            type: Sequelize.BOOLEAN,
            allowNull: false,
            defaultValue: false,
        })
    },
    down: (queryInterface, Sequelize) => {
        return queryInterface.changeColumn('users', 'active', {
            type: Sequelize.BOOLEAN,
        });
    }
};
Posted by: Guest on July-15-2021

Code answers related to "sequelize add not null constraint"

Code answers related to "Javascript"

Browse Popular Code Answers by Language