Skip to content

Update diesel packages to v2.1.0 #6531

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

Merged
merged 2 commits into from
May 30, 2023
Merged

Update diesel packages to v2.1.0 #6531

merged 2 commits into from
May 30, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 26, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
diesel (source) build-dependencies minor =2.0.4 -> =2.1.0
diesel (source) dependencies minor =2.0.4 -> =2.1.0
diesel_cli (source) minor 2.0.1 -> 2.1.0
diesel_full_text_search dependencies minor =2.0.0 -> =2.1.0
diesel_migrations build-dependencies minor =2.0.0 -> =2.1.0
diesel_migrations dependencies minor =2.0.0 -> =2.1.0

Release Notes

diesel-rs/diesel

v2.1.0

Compare Source

Changed
  • The minimal officially supported rustc version is now 1.65.0
Added
  • Added the custom_type_derives config option to customize the derives for SQL
    type definitions automatically generated by Diesel CLI.
  • Add a #[derive(MultiConnection)] proc-macro that lets you easily implement diesel::Connection
    for an enum of connections to different database backends.
  • Added a --diff-schema flag to the diesel migration generate command that generates a migration based
    on the difference between your database and the provided schema.rs file
  • Add a ON CONFLICT (...) DO UPDATE ... [WHERE ...] conditional clause support for PostgreSQL.
  • Add support for MySQL's ON DUPLICATE KEY DO UPDATE syntax through the existing upsert functions.
  • Add ability to define multiple columns in a single distinct_on for PostgreSQL,
    like: .distinct_on((column_a, column_b)).
  • Added column size restrictions to the generated schema.rs file

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/diesel-packages branch 2 times, most recently from 1cbb3fd to 6f653e5 Compare May 26, 2023 17:27
@Turbo87
Copy link
Member

Turbo87 commented May 30, 2023

@weiznich any clue why the migration stuff on CI might have failed due to this update?

@weiznich
Copy link
Contributor

Likely because the generated schema.rs file contains new information and now the provided patch file does not apply without conflicts anymore. You need to regenerate the patch file in that case. Usually that involves the following steps:

  • Removing the patch file from the diesel.toml file
  • Regenerate a unpatched schema.rs file.
  • Apply the patch file via command line and resolve the merge conflicts
  • Regenerate the patch file and re-enable it in the diesel.toml file

(I should probably try if we can improve that process on diesels side)

@Turbo87
Copy link
Member

Turbo87 commented May 30, 2023

ahhhh, that explains it. thank you. would it be possible to improve the error message somehow to explicitly mention the patch file? :)

@Turbo87 Turbo87 force-pushed the renovate/diesel-packages branch from 6f653e5 to 0309176 Compare May 30, 2023 09:13
@Turbo87 Turbo87 merged commit 5f59b9a into master May 30, 2023
@Turbo87 Turbo87 deleted the renovate/diesel-packages branch May 30, 2023 10:15
@renovate
Copy link
Contributor Author

renovate bot commented May 30, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@Turbo87
Copy link
Member

Turbo87 commented Feb 19, 2024

for my future self or anyone else reading this:

  1. prefix patch_file = "src/schema.patch" in diesel.toml with a # to comment it out.
  2. use diesel print-schema and save the output to src/schema.rs.orig
  3. use patch -o src/schema.rs src/schema.rs.orig src/schema.patch to apply the patch file and solve remaining issues in the src/schema.rs file
  4. use diff -Naur src/schema.rs.orig src/schema.rs to generate the new content for the src/schema.patch file
  5. enable the patch_file option in the diesel.toml file again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants