mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-19 00:00:14 +02:00
Add sqlx example with migrations (#722)
* Add sqlx example with migrations Simple use case for sqlx based on tokio postgres example. Sqlite database is created on execution in ./target directory and migrations are then run against it. * sqlx example uses postgres instead of sqlite3 Also removed migrations and database creation code.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
[package]
|
||||
name = "example-sqlx-postgres"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
axum = { path = "../../axum" }
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version="0.3", features = ["env-filter"] }
|
||||
|
||||
|
||||
sqlx = { version = "0.5.10", features = ["runtime-tokio-rustls", "any", "postgres"] }
|
||||
Reference in New Issue
Block a user