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

postgres(normalize types to eliminate noop migrations) #1518

Merged
merged 2 commits into from Sep 21, 2023

Conversation

HugoPeters1024
Copy link
Contributor

@HugoPeters1024 HugoPeters1024 commented Sep 20, 2023

Fixes #1517. I've kept the list non exhaustive because I simply was not sure how to handle every case. Notably when the alias did not have a placeholder variable but the base name did (e.g. timestamptz). I also looked around in the Postgresql.Simple modules to see if something like this already existed but it did not look like it.

At the risk of sounding selfish, this fixes my immediate problem does not make the code worse.


Before submitting your PR, check that you've:

  • Ran stylish-haskell on any changed files.
  • Adhered to the code style (see the .editorconfig file for details)

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

@parsonsmatt
Copy link
Collaborator

This looks good to me. If you want to add a test and finish the PR checklist I'd be happy to do a patch release.

Comment on lines +3 to +6
## 2.14.6.1 (unreleased)

* [#1518](https://github.com/yesodweb/persistent/pull/1518)
* Normalize postgres type aliases to prevent noop migrations
Copy link
Collaborator

Choose a reason for hiding this comment

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

The change is actually in persistent-postgresql, not persistent, so you'll want to make the version bump and changelog modification there 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for fixing it :)

@parsonsmatt parsonsmatt merged commit dfd87cc into yesodweb:master Sep 21, 2023
7 checks passed
@parsonsmatt
Copy link
Collaborator

Released as persistent-postgresql-2.13.6.1

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.

Postgres: BIGINT and INT8 are an alias and should not require migration.
2 participants