sequelize/sequelize — pull request #1990 by nunofgs (2014-07-01 10:38:11+00:00)
Title: Fix change column migration for enums on Postgres

Fixes an issue in Postgres when altering a column from a *non-enum* type into an *enum* type.

For example, the following query:

```SQL
ALTER TABLE "User" ALTER COLUMN "level" TYPE "enum_User_level";
```

would generate the error: `column "level" cannot be cast automatically to type "enum_User_level"`.

Postgres requires manually casting the column into the new type. This PR changes the query into:

```SQL
ALTER TABLE "User" ALTER COLUMN "level" TYPE "enum_User_level" USING ("level"::"enum_User_level");
```