Skip to content

fix(postgres): sync with alter method fails with dataType enum (#7649) - #15738

Merged
WikiRik merged 3 commits into
sequelize:mainfrom
aristov:fix/pgEnum-alter
Mar 5, 2023
Merged

WikiRik merged 3 commits into
sequelize:mainfrom
aristov:fix/pgEnum-alter

Conversation

@aristov

@aristov aristov commented Mar 3, 2023

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description Of Change

Closes #7649

This change fixes an error that occurs when calling sync({ alter : true }) on a model with the ENUM data type.

This is a port of changes from #15718 to main (v7).

Todos

  • This only fixes the sync() failure, but sync can't delete/replace the enum value yet

@ephys

ephys commented Mar 4, 2023

Copy link
Copy Markdown
Member

Since your test is failing in DB2 & MSSQL, you can exclude these two dialects from that test and add a TODO to fix them, we'll do that separately from this PR

@aristov
aristov force-pushed the fix/pgEnum-alter branch from eb8a92c to 70842e8 Compare March 4, 2023 15:19
@aristov

aristov commented Mar 5, 2023

Copy link
Copy Markdown
Contributor Author

Since your test is failing in DB2 & MSSQL, you can exclude these two dialects from that test and add a TODO to fix them, we'll do that separately from this PR

Done.

@ephys ephys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks :)

@WikiRik if you want to take one last look before we merge :)

@WikiRik WikiRik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for opening a PR towards main!

@WikiRik
WikiRik merged commit 6d9a58e into sequelize:main Mar 5, 2023
@dapeleg-dn

Copy link
Copy Markdown

FYI, this change introduced a bug when using CockroachDB. See: #16191

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.

sync() with new alter method fails with dataType enum

4 participants