Move database migrations to SQLx

This commit is contained in:
jude
2023-03-23 11:38:53 +00:00
parent 4edcee2567
commit 31ee6b4540
9 changed files with 441 additions and 382 deletions

View File

@ -66,7 +66,6 @@ pub async fn register_application_commands(
Ok(())
}
// entry point
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
env_logger::init();
@ -129,6 +128,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.await
.unwrap();
sqlx::migrate!().run(&database).await?;
poise::Framework::builder()
.token(discord_token)
.user_data_setup(move |ctx, _bot, framework| {