Node, Sequelize, Mysql - How to define collation and charset to models?
In the part where u define sequelize
var sequelize = new Sequelize('database', 'username', 'password', {
define: {
charset: 'utf8',
collate: 'utf8_general_ci',
timestamps: true
},
logging:false
});
For Table level Changing
sequelize.define('songs', {
name: DataTypes.STRING,
link: DataTypes.STRING,
artist: DataTypes.STRING,
lyrics: DataTypes.TEXT,
writer: DataTypes.STRING,
composer: DataTypes.STRING
}, {
charset: 'utf8',
collate: 'utf8_unicode_ci'
});