setting diesel up more
This commit is contained in:
parent
37a2dbd986
commit
caed6e6367
5 changed files with 10 additions and 11 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
[print_schema]
|
||||
file = "src/rust/schema.rs"
|
||||
generate_missing_sql_type_definitions = false
|
||||
|
||||
[migrations_directory]
|
||||
dir = "src/rust/migrations"
|
||||
|
|
|
@ -83,6 +83,7 @@ mod image_model {
|
|||
println!("SHOWING IMAGES");
|
||||
for image in results {
|
||||
println!("{}", image.title);
|
||||
println!("{}", image.id);
|
||||
println!("--------------\n");
|
||||
println!("{}", image.path);
|
||||
}
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
|
||||
// mod my_object;
|
||||
mod file_helper;
|
||||
pub mod image_model;
|
||||
pub mod models;
|
||||
pub mod schema;
|
||||
mod service_thing;
|
||||
mod settings;
|
||||
mod slide_obj;
|
||||
mod slide_model;
|
||||
mod image_model;
|
||||
mod models;
|
||||
mod schema;
|
||||
mod slide_obj;
|
||||
// mod entities;
|
||||
// mod video_thumbnail;
|
||||
|
|
|
@ -4,5 +4,6 @@ use diesel::prelude::*;
|
|||
pub struct Image {
|
||||
pub id: i32,
|
||||
pub title: String,
|
||||
#[diesel(column_name = "filePath")]
|
||||
pub path: String,
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@ diesel::table! {
|
|||
images (id) {
|
||||
id -> Integer,
|
||||
title -> Text,
|
||||
filePath -> Text,
|
||||
#[sql_name = "filePath"]
|
||||
path -> Text,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,9 +48,4 @@ diesel::table! {
|
|||
}
|
||||
}
|
||||
|
||||
diesel::allow_tables_to_appear_in_same_query!(
|
||||
images,
|
||||
presentations,
|
||||
songs,
|
||||
videos,
|
||||
);
|
||||
diesel::allow_tables_to_appear_in_same_query!(images, presentations, songs, videos,);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue