Vishnu Mishra
Vishnu Mishra

Reputation: 4029

Sequelize PostgreSQL: Change Column type string to array of String

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

Answers (1)

Vishnu Mishra
Vishnu Mishra

Reputation: 4029

It was issue with [email protected]

Downgrading to [email protected] fixes the issue.

Upvotes: 2

Related Questions