diff --git a/pagetop/src/core/module/all.rs b/pagetop/src/core/module/all.rs
index ddbcd5b5..e4e2b923 100644
--- a/pagetop/src/core/module/all.rs
+++ b/pagetop/src/core/module/all.rs
@@ -114,8 +114,6 @@ pub fn init_modules() {
#[cfg(feature = "database")]
pub fn run_migrations() {
if let Some(dbconn) = &*DBCONN {
- use crate::locale::L10n;
-
if let Err(e) = run_now({
struct Migrator;
impl MigratorTrait for Migrator {
@@ -129,9 +127,7 @@ pub fn run_migrations() {
}
Migrator::up(SchemaManagerConnection::Connection(dbconn), None)
}) {
- L10n::l("db_migration_fail")
- .with_arg("dberr", format!("{}", e))
- .error();
+ trace::error!("Database upgrade failed ({})", e);
};
if let Err(e) = run_now({
@@ -147,9 +143,7 @@ pub fn run_migrations() {
}
Migrator::down(SchemaManagerConnection::Connection(dbconn), None)
}) {
- L10n::l("db_migration_fail")
- .with_arg("dberr", format!("{}", e))
- .error();
+ trace::error!("Database downgrade failed ({})", e);
};
}
}
diff --git a/pagetop/src/db.rs b/pagetop/src/db.rs
index 4560b716..aac2e073 100644
--- a/pagetop/src/db.rs
+++ b/pagetop/src/db.rs
@@ -1,6 +1,5 @@
//! Acceso unificado y normalizado a base de datos.
-use crate::locale::L10n;
use crate::{config, trace, LazyStatic};
pub use url::Url as DbUri;
@@ -12,6 +11,8 @@ use sea_orm::{ConnectOptions, ConnectionTrait, Database, DatabaseBackend, Statem
pub(crate) use futures::executor::block_on as run_now;
+const DBCONN_NOT_INITIALIZED: &str = "Database connection not initialized";
+
pub(crate) static DBCONN: LazyStatic