diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 65a32d4..355cc88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,6 +39,10 @@ async fn main() { let mut conn = PgPoolOptions::new() .max_connections(5) .connect(&std::env::var("DATABASE_URL").unwrap_or("postgres://postgres@localhost/homeworld".to_string())).await.unwrap(); + + sqlx::migrate!("./migrations") + .run(&conn) + .await.unwrap(); let shared_state = Arc::new(State { conn |