adding barrel for initial SQL definition script

This commit is contained in:
Gabor Körber 2023-10-18 00:54:57 +02:00
parent 4ac62a1005
commit 30a40c4831
4 changed files with 16 additions and 2 deletions

7
Cargo.lock generated
View File

@ -113,6 +113,12 @@ dependencies = [
"rustc-demangle", "rustc-demangle",
] ]
[[package]]
name = "barrel"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad9e605929a6964efbec5ac0884bd0fe93f12a3b1eb271f52c251316640c68d9"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.3.2" version = "1.3.2"
@ -540,6 +546,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"axum", "axum",
"barrel",
"diesel", "diesel",
"dotenvy", "dotenvy",
"mime_guess", "mime_guess",

View File

@ -5,9 +5,14 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[featues]
# https://github.com/rust-db/barrel/blob/master/guides/diesel-setup.md
use_barrel = []
[dependencies] [dependencies]
anyhow = "1.0.75" anyhow = "1.0.75"
axum = "0.6.20" axum = "0.6.20"
barrel = { version = "0.7.0", optional = true }
diesel = { version = "2.1.3", features = ["serde_json", "postgres"] } diesel = { version = "2.1.3", features = ["serde_json", "postgres"] }
dotenvy = "0.15.7" dotenvy = "0.15.7"
mime_guess = "2.0.4" mime_guess = "2.0.4"

View File

@ -17,3 +17,7 @@ pg-up:
# Stop PostgreSQL # Stop PostgreSQL
pg-down: pg-down:
cd docker && docker-compose down cd docker && docker-compose down
dev-install:
cargo install diesel_cli --no-default-features --features="postgres"

View File

@ -47,8 +47,6 @@ So this is not thought of being a framework.
## Development Installation ## Development Installation
For Dev with SQLite For Dev with SQLite
- `cargo install diesel_cli --no-default-features --features postgres` - `cargo install diesel_cli --no-default-features --features postgres`