mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 13:51:19 +00:00
Update utils.rs
This commit is contained in:
parent
394a859563
commit
4dd36f1a15
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,7 @@ use chrono::{DateTime, Utc};
|
|||
use deadpool::Runtime;
|
||||
use diesel::{
|
||||
backend::Backend,
|
||||
connection::SimpleConnection,
|
||||
deserialize::FromSql,
|
||||
helper_types::AsExprOf,
|
||||
pg::Pg,
|
||||
|
@ -284,6 +285,9 @@ fn run_migrations(db_url: &str) {
|
|||
let _ = &mut conn
|
||||
.run_pending_migrations(MIGRATIONS)
|
||||
.unwrap_or_else(|e| panic!("Couldn't run DB Migrations: {e}"));
|
||||
conn
|
||||
.batch_execute(include_str!("../../../replaceable_schema.sql"))
|
||||
.expect("Couldn't run replaceable_schema.sql");
|
||||
info!("Database migrations complete.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue