diff --git a/drust/Cargo.toml b/drust/Cargo.toml index cfa4a264..dd0bfdc5 100644 --- a/drust/Cargo.toml +++ b/drust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drust" -version = "0.1.0" +version = "0.0.1" edition = "2021" authors = [ @@ -12,12 +12,10 @@ description = """\ homepage = "https://suitepro.cillero.es/projects/drust" repository = "https://gitlab.com/manuelcillero/drust" -[dependencies] -actix-web = "3.3.3" -maud = { version = "0.23.0" } -serde = { version = "1.0", features = ["derive"] } - [dependencies.pagetop] path = "../pagetop" features = ["mysql"] default-features = false + +[dependencies] +actix-web = "3.3.3" diff --git a/pagetop/Cargo.toml b/pagetop/Cargo.toml index 0b6c5d7d..b828e58f 100644 --- a/pagetop/Cargo.toml +++ b/pagetop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pagetop" -version = "0.1.0" +version = "0.0.1" edition = "2021" authors = [ diff --git a/pagetop/STARTER.Cargo.toml b/pagetop/STARTER.Cargo.toml index 08b251e7..7cddd5fc 100644 --- a/pagetop/STARTER.Cargo.toml +++ b/pagetop/STARTER.Cargo.toml @@ -6,8 +6,21 @@ edition = "2021" # Ver más claves y sus definiciones en # https://doc.rust-lang.org/cargo/reference/manifest.html +[dependencies.pagetop] +path = "../pagetop" +# Opcional. Por defecto se puede usar PageTop sin base de datos. +features = ["mysql"] +# features = ["postgres"] +# features = ["sqlite"] +# PageTop puede dar soporte a todas las bases de datos. +# features = ["mysql", "postgres", "sqlite"] +# Sólo cuando no se usen las características predeterminadas. +default-features = false + [dependencies] -pagetop = { path = "pagetop" } +# Requerido. actix-web = "3.3.3" +# Opcional. Sólo si se usa la macro html!. maud = { version = "0.23.0" } +# Opcional. Si se requiere serialización de estructuras de datos. serde = { version = "1.0", features = ["derive"] } diff --git a/pagetop/src/core/global.rs b/pagetop/src/core/global.rs index 0b307c56..dd9aa909 100644 --- a/pagetop/src/core/global.rs +++ b/pagetop/src/core/global.rs @@ -43,7 +43,7 @@ pub fn modules(cfg: &mut server::web::ServiceConfig) { } #[cfg(any(feature = "mysql", feature = "postgres", feature = "sqlite"))] -pub fn check_migrations() { +pub fn run_migrations() { trace::info!("Checking migrations."); for m in MODULES.read().unwrap().iter() { m.migrations( diff --git a/pagetop/src/core/server/app.rs b/pagetop/src/core/server/app.rs index dd794a68..7338aa3b 100644 --- a/pagetop/src/core/server/app.rs +++ b/pagetop/src/core/server/app.rs @@ -72,7 +72,7 @@ impl Application { // Comprueba actualizaciones pendientes de la base de datos (opcional). #[cfg(any(feature = "mysql", feature = "postgres", feature = "sqlite"))] - global::check_migrations(); + global::run_migrations(); // Prepara el servidor web. let server = server::HttpServer::new(move || {