diff --git a/server/main-api/src/main.rs b/server/main-api/src/main.rs index bafc6abf1..56bb638a4 100644 --- a/server/main-api/src/main.rs +++ b/server/main-api/src/main.rs @@ -85,11 +85,6 @@ async fn main() -> Result<(), BoxedError> { .connect(&connection_string()) .await .unwrap(); - #[cfg(not(feature = "skip_db_setup"))] - { - setup::database::setup(&pool).await.unwrap(); - setup::database::load_data(&pool).await.unwrap(); - } #[cfg(not(feature = "skip_ms_setup"))] { let ms_url = @@ -98,6 +93,11 @@ async fn main() -> Result<(), BoxedError> { setup::meilisearch::setup(&client).await.unwrap(); setup::meilisearch::load_data(&client).await.unwrap(); } + #[cfg(not(feature = "skip_db_setup"))] + { + setup::database::setup(&pool).await.unwrap(); + setup::database::load_data(&pool).await.unwrap(); + } calendar::refresh::all_entries(&pool).await; });