Allow build.rs to figure out the correct database schema
This commit is contained in:
parent
828490df3b
commit
fe0011e757
1 changed files with 2 additions and 0 deletions
2
build.rs
2
build.rs
|
@ -15,6 +15,7 @@ use walkdir::WalkDir;
|
||||||
mod sqlfunc {
|
mod sqlfunc {
|
||||||
use diesel::sql_types::Text;
|
use diesel::sql_types::Text;
|
||||||
sql_function!(fn markdown_to_fts(text: Text) -> Text);
|
sql_function!(fn markdown_to_fts(text: Text) -> Text);
|
||||||
|
sql_function!(fn theme_from_str_hash(text: Text) -> Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -33,6 +34,7 @@ fn main() {
|
||||||
.expect("Should be able to enable foreign keys");
|
.expect("Should be able to enable foreign keys");
|
||||||
|
|
||||||
sqlfunc::markdown_to_fts::register_impl(&connection, |_: String| -> String { unreachable!() }).unwrap();
|
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();
|
diesel_migrations::run_pending_migrations(&connection).unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue