-
Notifications
You must be signed in to change notification settings - Fork 647
database/versions: Add new semver_no_prerelease
column
#4022
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
Conversation
79db897
to
8973443
Compare
☔ The latest upstream changes (presumably #4034) made this pull request unmergeable. Please resolve the merge conflicts. |
94c9b70
to
8e8bb01
Compare
9689763
to
cc66bfa
Compare
This is needed to support the `Numeric` type in Postgres, which is used by our custom `to_semver_no_prerelease` function
cc66bfa
to
e49c704
Compare
The PR itself looks good to me. For the SQL script, my understanding is that
|
setting this PR to draft mode for now, until we've decided wether or not #4106 is a better way |
☔ The latest upstream changes (presumably #4108) made this pull request unmergeable. Please resolve the merge conflicts. |
closing in favor of #4106 |
This PR is an alternative to:
version_no_prerelease
column #3992 andto_semver_no_prerelease()
withsemver_no_prerelease
column #4016Instead of using our custom
semver_triple
database type (which caused issues withdiesel
) we will use an array (NUMERIC[3]
). This provides the same sorting and filtering functionality, but is easier to deal with indiesel
.This PR only adds the new column and adjusts the code to fill it for new crate versions, but it does not backfill it for old versions. Neither does it adjust the reverse dependencies SQL query to use the new column, as that requires the old versions to be backfilled first. This will be changed in a future PR.
A SQL script to backfill the column for old versions is: