change location of dev db and bump version

This commit is contained in:
2023-05-06 21:59:24 -07:00
parent 94400ba7d5
commit e866a4a643
9 changed files with 30 additions and 24 deletions

View File

@ -66,6 +66,7 @@ pub async fn connect_db() -> Result<SqlitePool, SetupError> {
.create_if_missing(true);
let pool_opts = SqlitePoolOptions::new();
let pool: SqlitePool = pool_opts.connect_with(conn_opts).await?;
sqlx::migrate!().run(&pool).await?;
Ok(pool)
}
@ -74,8 +75,6 @@ async fn setup(app: &mut App) -> Result<(), Box<dyn Error>> {
APP.set(app.handle()).unwrap();
let pool = connect_db().await?;
sqlx::migrate!().run(&pool).await?;
let conf = AppConfig::load(&pool).await?;
let session = Session::load(&pool).await?;
let srv = Server::new(conf.listen_addr, conf.listen_port, app.handle()).await?;