sequelize alter migration code example
Example 1: sequelize generate migration
npx sequelize-cli migration:generate --name add-title-post-table
Example 2: sequelize migration default value
queryInterface.addColumn('OrderBackups', 'my_column', {
type: Sequelize.INTEGER,
defaultValue: 0
})
Example 3: sequelize migration limit
queryInterface.createTable(
'Posts',
{
title: {
type: Sequelize.DataTypes.STRING(100),
allowNull: false
}
}
);