summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorfx <[email protected]>2023-10-21 21:11:28 +0200
committerfx <[email protected]>2023-10-21 21:11:28 +0200
commitbf1aeb7191bfaa75f1acf47c675bc68b9fac1cd8 (patch)
tree5cd77421900fd8ec02f05d15e6fb195f28dfceb4 /src/main.rs
parentf5928b90748b0bb4c0c498ccc77ebde4eaec8841 (diff)
downloadwebol-bf1aeb7191bfaa75f1acf47c675bc68b9fac1cd8.tar
webol-bf1aeb7191bfaa75f1acf47c675bc68b9fac1cd8.tar.gz
webol-bf1aeb7191bfaa75f1acf47c675bc68b9fac1cd8.zip
add migrate macro
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 8b4e9eb..ce12cf6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,7 +7,7 @@ use time::util::local_offset;
7use tracing::{info, level_filters::LevelFilter}; 7use tracing::{info, level_filters::LevelFilter};
8use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*}; 8use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*};
9use crate::config::SETTINGS; 9use crate::config::SETTINGS;
10use crate::db::{init_db_pool, setup_db}; 10use crate::db::init_db_pool;
11use crate::routes::device::{get_device, post_device, put_device}; 11use crate::routes::device::{get_device, post_device, put_device};
12use crate::routes::start::start; 12use crate::routes::start::start;
13 13
@@ -41,7 +41,7 @@ async fn main() {
41 info!("start webol v{}", version); 41 info!("start webol v{}", version);
42 42
43 let db = init_db_pool().await; 43 let db = init_db_pool().await;
44 setup_db(&db).await.unwrap(); 44 sqlx::migrate!().run(&db).await.unwrap();
45 45
46 let shared_state = Arc::new(AppState { db }); 46 let shared_state = Arc::new(AppState { db });
47 47