🚨 Acceso a db es característica de compilación

This commit is contained in:
Manuel Cillero 2022-11-12 18:53:59 +01:00
parent 514490f5f2
commit e38cfca945
2 changed files with 7 additions and 4 deletions

View file

@ -4,7 +4,10 @@ use crate::core::{module, theme};
use crate::html::Markup;
use crate::response::page::ResultPage;
use crate::response::FatalError;
use crate::{config, db, locale, server, trace, LazyStatic};
use crate::{config, locale, server, trace, LazyStatic};
#[cfg(feature = "database")]
use crate::db;
use actix_web::dev::Server;

View file

@ -2,7 +2,7 @@ use super::ModuleStaticRef;
use crate::core::hook::add_action;
use crate::core::theme;
use crate::{db, server, trace, LazyStatic};
use crate::{server, trace, LazyStatic};
#[cfg(feature = "database")]
use crate::{db::*, run_now};
@ -110,7 +110,7 @@ pub fn run_migrations() {
migrations
}
}
Migrator::up(&db::DBCONN, None)
Migrator::up(&DBCONN, None)
})
.unwrap();
@ -125,7 +125,7 @@ pub fn run_migrations() {
migrations
}
}
Migrator::down(&db::DBCONN, None)
Migrator::down(&DBCONN, None)
})
.unwrap();
}