Run database migrations on start
This commit is contained in:
parent
bd8b27a9ad
commit
540f9d2f72
@ -8,12 +8,18 @@ extern crate openssl;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate diesel;
|
extern crate diesel;
|
||||||
|
|
||||||
|
#[cfg(feature = "ssr")]
|
||||||
|
extern crate diesel_migrations;
|
||||||
|
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
use dotenv::dotenv;
|
use dotenv::dotenv;
|
||||||
dotenv().ok();
|
dotenv().ok();
|
||||||
|
|
||||||
|
// Bring the database up to date
|
||||||
|
libretunes::database::migrate();
|
||||||
|
|
||||||
use actix_files::Files;
|
use actix_files::Files;
|
||||||
use actix_web::*;
|
use actix_web::*;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user