mirror of
https://github.com/flibusta-apps/services_manager_server.git
synced 2026-03-03 07:00:54 +01:00
Run SQLx migrations at startup
Add an initial services table migration and enable the sqlx "migrate" feature. Introduce run_migrations in db.rs, run migrations on startup, and pass the PgPool into the router.
This commit is contained in:
@@ -34,4 +34,4 @@ tracing-subscriber = { version = "0.3.19", features = ["env-filter"]}
|
||||
sentry-tracing = "0.42.0"
|
||||
tower-http = { version = "0.6.2", features = ["trace"] }
|
||||
|
||||
sqlx = { version = "0.8.3", features = ["runtime-tokio", "postgres", "macros", "chrono"] }
|
||||
sqlx = { version = "0.8.3", features = ["runtime-tokio", "postgres", "macros", "chrono", "migrate"] }
|
||||
|
||||
Reference in New Issue
Block a user