From b41e982daf4c59f36b4ca7694ae5ed8c9b2a1ba0 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 11 Sep 2021 23:06:49 +0900 Subject: [PATCH] Run plume_models::migrate_data() on initialization --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0d3cd61a..8a896b2a 100755 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ use diesel::r2d2::ConnectionManager; use plume_models::{ db_conn::{DbPool, PragmaForeignKey}, instance::Instance, + migrate_data, migrations::IMPORTED_MIGRATIONS, remote_fetch_actor::RemoteFetchActor, search::{actor::SearchActor, Searcher as UnmanagedSearcher}, @@ -79,6 +80,7 @@ Then try to restart Plume. "# ) } + migrate_data(&dbpool).expect("Failed to migrate data"); let workpool = ScheduledThreadPool::with_name("worker {}", num_cpus::get()); // we want a fast exit here, so let searcher = Arc::new(UnmanagedSearcher::open_or_recreate(