Reputation: 4029
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.
Upvotes: 2
Views: 4870
Reputation: 4029
It was issue with [email protected]
Downgrading to [email protected] fixes the issue.
Upvotes: 2