From fe0011e757dda72293ab81a8dfb210f5957f108e Mon Sep 17 00:00:00 2001 From: Magnus Hovland Hoff Date: Sun, 23 Sep 2018 21:39:54 +0200 Subject: [PATCH] Allow build.rs to figure out the correct database schema --- build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.rs b/build.rs index 3dadbc5..7369094 100644 --- a/build.rs +++ b/build.rs @@ -15,6 +15,7 @@ use walkdir::WalkDir; mod sqlfunc { use diesel::sql_types::Text; sql_function!(fn markdown_to_fts(text: Text) -> Text); + sql_function!(fn theme_from_str_hash(text: Text) -> Text); } fn main() { @@ -33,6 +34,7 @@ fn main() { .expect("Should be able to enable foreign keys"); sqlfunc::markdown_to_fts::register_impl(&connection, |_: String| -> String { unreachable!() }).unwrap(); + sqlfunc::theme_from_str_hash::register_impl(&connection, |_: String| -> String { unreachable!() }).unwrap(); diesel_migrations::run_pending_migrations(&connection).unwrap();