From 88d527d574567420d7aa72f37205bd6b345b8dd7 Mon Sep 17 00:00:00 2001 From: Melody Horn / boringcactus Date: Sat, 19 Jun 2021 23:10:53 -0600 Subject: generate diesel::table! in derive(Model) --- tests/tutorial/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/tutorial') diff --git a/tests/tutorial/mod.rs b/tests/tutorial/mod.rs index b26aa39..25f251b 100644 --- a/tests/tutorial/mod.rs +++ b/tests/tutorial/mod.rs @@ -117,6 +117,8 @@ pub fn urls() -> UrlMap { // update main.rs fs::write("src/main.rs", r#" +#[macro_use] extern crate diesel; + use tosin::Settings; use tosin::contrib::admin; use tosin::db::backend::Connectable; @@ -174,6 +176,8 @@ pub fn step2() { step1(); // update main.rs fs::write("src/main.rs", r#" +#[macro_use] extern crate diesel; + use tosin::Settings; use tosin::contrib::admin; use tosin::db::backend::Connectable; @@ -217,6 +221,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +diesel = { version = "1.4.4", features = ["sqlite"] } time = "0.2.27" tosin = { path = "/home/cactus/Documents/tosin" } "#).unwrap(); @@ -250,6 +255,8 @@ gather!(); // update main.rs fs::write("src/main.rs", r#" +#[macro_use] extern crate diesel; + use tosin::Settings; use tosin::contrib::admin; use tosin::db::backend::Connectable; -- cgit v1.2.3