In my MySQL database i have a JSON column that i created using the following sequelize-cli migration:
queryInterface.addColumn(
'Users',
'favorites',
{
type: Sequelize.JSON,
allowNull: false,
defaultValue: []
}
);
However, instead of having a default value of []
, the records are getting a default value of null
for that column.
What am i doing wrong?