diff options
Diffstat (limited to 'src/db/migration/change.rs')
-rw-r--r-- | src/db/migration/change.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/db/migration/change.rs b/src/db/migration/change.rs index 8bb8bf6..a07ef24 100644 --- a/src/db/migration/change.rs +++ b/src/db/migration/change.rs @@ -1,6 +1,6 @@ -use diesel::Connection; +use diesel::Connection as _; -use crate::db::backend::Connectable; +use crate::db::backend::{Connection, SqlGenerator}; use crate::db::models::Field; pub enum DatabaseChange { @@ -12,7 +12,7 @@ pub enum DatabaseChange { } impl DatabaseChange { - pub fn apply<C: Connectable>(&self, app_name: &str, connection: &C::Connection) { + pub fn apply(&self, app_name: &str, connection: &Connection) { use barrel::{types, Migration, Table}; match self { @@ -55,7 +55,7 @@ impl DatabaseChange { m.create_table(table_name, callback); } - connection.execute(&m.make::<C::SqlGenerator>()).unwrap(); + connection.execute(&m.make::<SqlGenerator>()).unwrap(); } } } |