From 30a40c48317b49695aa60a963d315cd4badea7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabor=20K=C3=B6rber?= Date: Wed, 18 Oct 2023 00:54:57 +0200 Subject: [PATCH] adding barrel for initial SQL definition script --- Cargo.lock | 7 +++++++ Cargo.toml | 5 +++++ Justfile | 4 ++++ README.md | 2 -- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ddb3e1b..26ca050 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -113,6 +113,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "barrel" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9e605929a6964efbec5ac0884bd0fe93f12a3b1eb271f52c251316640c68d9" + [[package]] name = "bitflags" version = "1.3.2" @@ -540,6 +546,7 @@ version = "0.1.0" dependencies = [ "anyhow", "axum", + "barrel", "diesel", "dotenvy", "mime_guess", diff --git a/Cargo.toml b/Cargo.toml index bdd1c59..4157837 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,14 @@ edition = "2021" # 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] anyhow = "1.0.75" axum = "0.6.20" +barrel = { version = "0.7.0", optional = true } diesel = { version = "2.1.3", features = ["serde_json", "postgres"] } dotenvy = "0.15.7" mime_guess = "2.0.4" diff --git a/Justfile b/Justfile index 2d1efe7..6206c25 100644 --- a/Justfile +++ b/Justfile @@ -17,3 +17,7 @@ pg-up: # Stop PostgreSQL pg-down: cd docker && docker-compose down + +dev-install: + cargo install diesel_cli --no-default-features --features="postgres" + \ No newline at end of file diff --git a/README.md b/README.md index da6a45d..8967df3 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,6 @@ So this is not thought of being a framework. ## Development Installation - - For Dev with SQLite - `cargo install diesel_cli --no-default-features --features postgres`