initial mysql support

This commit is contained in:
Nils Domrose
2019-05-26 23:02:41 +02:00
committed by Nils Domrose
parent badd22ac3d
commit ff759397f6
55 changed files with 454 additions and 21 deletions

View File

@@ -191,7 +191,11 @@ fn check_web_vault() {
// https://docs.rs/diesel_migrations/*/diesel_migrations/macro.embed_migrations.html
#[allow(unused_imports)]
mod migrations {
embed_migrations!();
#[cfg(feature = "sqlite")]
embed_migrations!("migrations/sqlite");
#[cfg(feature = "mysql")]
embed_migrations!("migrations/mysql");
pub fn run_migrations() {
// Make sure the database is up to date (create if it doesn't exist, or run the migrations)