feat: add base database management
This commit is contained in:
parent
1d5a517395
commit
1e3c235b78
11 changed files with 132 additions and 20 deletions
|
|
@ -18,6 +18,8 @@ pub async fn get_database() -> crate::Result<SqlitePool> {
|
|||
.journal_mode(SqliteJournalMode::Wal);
|
||||
|
||||
let pool = SqlitePool::connect_with(opts).await?;
|
||||
|
||||
sqlx::migrate!("./migrations").run(&pool).await?;
|
||||
|
||||
Ok(pool)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue