Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 backport: Fixes QueryInterface#changeColumn for enums #7456

Merged
merged 3 commits into from
Apr 19, 2017

Conversation

seshness
Copy link
Contributor

Pull Request check-list

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does your issue contain a link to existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Have you added an entry under Future in the changelog?

Description of change

Previous changes to support schemas in QueryInterface generated invalid Postgres SQL when attempting to change a column to an enum value.

Instead of generating

ALTER TABLE "myTable" ALTER COLUMN "col_1" TYPE "public"."enum_myTable_col_1" USING ("col_1"::"public.enum_myTable_col_1");

with this change we will now generate

ALTER TABLE "myTable" ALTER COLUMN "col_1" TYPE "public"."enum_myTable_col_1" USING ("col_1"::"public"."enum_myTable_col_1");

@mention-bot
Copy link

@seshness, thanks for your PR! By analyzing the history of the files in this pull request, we identified @overlookmotel, @jonathana and @durango to be potential reviewers.

@codecov-io
Copy link

codecov-io commented Mar 30, 2017

Codecov Report

Merging #7456 into v3 will increase coverage by 0.04%.
The diff coverage is 100%.

@sushantdhiman
Copy link
Contributor

@seshness Needs a changelog entry

[FIXED] `changeColumn` generates incorrect query with ENUM type [#7456](https://github.com/sequelize/sequelize/pull/7456)

@sushantdhiman sushantdhiman merged commit 360d621 into sequelize:v3 Apr 19, 2017
holm pushed a commit to holm/sequelize that referenced this pull request Nov 13, 2017
)

* Backport sequelize#7455

Fixes QueryInterface#changeColumn for enums

* Prevent test from running in MSSQL

* Adds a changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants