added database crate, "settings" with migrations and queries, running migrations on web startup
This commit is contained in:
parent
f60eb616d3
commit
9c2b43ec3c
16 changed files with 357 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ use sqlx::migrate::MigrateError;
|
|||
use sqlx::{Pool, Sqlite};
|
||||
|
||||
pub async fn run_migrations(pool: &Pool<Sqlite>) -> Result<(), MigrateError> {
|
||||
match sqlx::migrate!("../database").run(pool).await {
|
||||
match sqlx::migrate!("../database/migrations").run(pool).await {
|
||||
Ok(ok) => {
|
||||
println!("Migrations are OK");
|
||||
Ok(ok)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue