This commit is contained in:
parent
d42adbe274
commit
69e23fd9bb
4 changed files with 15 additions and 12 deletions
|
|
@ -23,12 +23,14 @@ impl Database {
|
|||
|
||||
let pool = SqlitePoolOptions::new().connect_with(db_options).await?;
|
||||
|
||||
tracing::debug!("migrating...");
|
||||
sqlx::migrate!("./migrations/each_user/").run(&pool).await?;
|
||||
if user.username == "demo" {
|
||||
sqlx::query_file!("./migrations/demo.sql")
|
||||
.execute(&pool)
|
||||
.await?;
|
||||
};
|
||||
tracing::debug!("...done.");
|
||||
|
||||
Ok(Self { pool })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue