I'm using the Sequelize ORM with PostgreSQL.
I need to Change the type of a column from String to Array[String].
I used this migration Script
up: (queryInterface, Sequelize) => {
return queryInterface.changeColumn('email','to', {
type:Sequelize.ARRAY(Sequelize.TEXT),
allowNull: false
});
}
ERROR: column "to" cannot be cast automatically to type text[]
I tried the answer from this link but It does not work for me
Please let me know If I'm doing something wrong.