I want create migration with Sequelize to rename column with camelCase to have a database with column in snake_case.
I use Sequelize to create migration and use migration.
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.renameColumn('my_some_table', 'totoId', 'toto_id');
},
down: function(queryInterface, Sequelize) {
//
}
};
But... I have a unique constraint on this column (totoId) and name column, named my_some_table_name_totoId_uindex, and I also have an index on this column (totoId).
How I can force renaming column who have a unique constraint and one index?