@@ -10,10 +10,13 @@ pub async fn run_migrations() {
|
||||
.list_database_names(None, None)
|
||||
.await
|
||||
.expect("Failed to fetch database names.");
|
||||
|
||||
|
||||
if list.iter().position(|x| x == "revolt").is_none() {
|
||||
init::create_database().await;
|
||||
} else {
|
||||
scripts::migrate_database().await;
|
||||
}
|
||||
|
||||
// panic!("https://pbs.twimg.com/media/EDTpB5JWwAUvyxd.jpg");
|
||||
rauth::entities::sync_models(&super::get_db()).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user