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

sqlx-migrations #199

Merged
merged 7 commits into from
Apr 3, 2023
Merged

sqlx-migrations #199

merged 7 commits into from
Apr 3, 2023

Conversation

ChuckHend
Copy link
Member

  • since we're using sqlx for binding query params and compile time checks, let's also use sqlx for the migrations
  • sets up the connection pool outside the route. the pool gets set up once then each route can draw a connection from the pool when it needs it, rather than creating a new connection pool on each request
  • added the foreign key constraint to the versions table
  • justfile for some dev helpers

@ChuckHend ChuckHend marked this pull request as ready for review April 2, 2023 01:25
Copy link
Member

@ianstanton ianstanton left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

Comment on lines +12 to +20
let conn = connect(&cfg.database_url)
.await
.expect("error connecting to database");

// run database migrations
sqlx::migrate!()
.run(&conn)
.await
.expect("error running migrations");
Copy link
Member

Choose a reason for hiding this comment

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

👍

@ChuckHend ChuckHend merged commit ddacc7b into main Apr 3, 2023
@ChuckHend ChuckHend deleted the sqlx-migrations branch April 3, 2023 01:43
sjmiller609 added a commit that referenced this pull request Dec 5, 2023
* TrunkInstallStatus error as bool

* Update CRD

* Update version of operator used by conductor
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.

2 participants