Repository navigation
chore(backend): upgrade sqlx to ^0.7 - #1865
Merged
Merged
Conversation
Contributor
Author
how it was testeddiff --git a/docker-compose.yml b/docker-compose.yml
index 7c01c244..88ca7669 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,8 +9,8 @@ services:
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
- expose:
- - 5432
+ ports:
+ - 5432:5432
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: windmilldocker compose up dbcargo install --version ^0.7 sqlx-cli
export DATABASE_URL=postgres://postgres:changeme@localhost/windmill?sslmode=disable
cd ./backend
sqlx migrate run cd ../frontend
npm ci
npm run generate-backend-client
npm run buildcd ../backend
# just in case
cargo sqlx prepare --workspace -- --all-features
# as per backend/README.md
cargo sqlx prepare --workspace -- --bin windmill --features enterprise
cargo run |
This comment was marked as resolved.
This comment was marked as resolved.
mrl5
marked this pull request as draft
July 12, 2023 08:36
mrl5
commented
Jul 14, 2023
…ectly ref: https://github.com/launchbadge/sqlx/blob/afb6b1066e61f8e3875f530d96cfb5a299f13fda/examples/postgres/transaction/src/main.rs#L14-L17 notice that I'm temporarly using my custom patch mrl5/sqlx@16e4c9a it's related to transact-rs/sqlx#2611
mrl5
marked this pull request as ready for review
July 15, 2023 05:44
mrl5
commented
Jul 15, 2023
| `cargo install sqlx-cli && sqlx migrate run`. This will also avoid compile | ||
| time issue with sqlx's `query!` macro | ||
| Postgres setup. The easiest way to get a working postgres is running `cargo | ||
| install --version ^0.7 sqlx-cli && sqlx migrate run`. This will also avoid |
Contributor
Author
There was a problem hiding this comment.
@rubenfiszel using sqlx-cli version (in terminal) that's in sync with sqlx version (in windmills Cargo.lock) is probably the most important take away for this PR.
On the other hand I think above is only relevant for contributors that need to run this
Lines 18 to 22 in aaaf85a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related to #1858
known
sqlx0.7 breaking changes:&mut Transaction<'_, Sqlite>: Executor<'_>is not satisfied transact-rs/sqlx#2606blocked by:upstream fix available in
0.7.1via transact-rs/sqlx#2619