From 4dd36f1a1509523355847da4415e6b8844516b13 Mon Sep 17 00:00:00 2001 From: dullbananas Date: Fri, 22 Dec 2023 17:37:01 -0700 Subject: [PATCH] Update utils.rs --- crates/db_schema/src/utils.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index 2b1179bee..5c73e6fa3 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -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."); }