aboutsummaryrefslogtreecommitdiff
path: root/src/db/migration/change.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-06-29 22:44:11 -0600
committerMelody Horn <melody@boringcactus.com>2021-06-29 22:44:11 -0600
commit9829bbfcd57c57e237c6aacb96a78d0b9f5bab68 (patch)
tree43dc643d7b592d9abc4c5f89121e249ccb597d7d /src/db/migration/change.rs
parent9dd7f2256a82f95096d928aaef70d15603152ebc (diff)
downloadtosin-9829bbfcd57c57e237c6aacb96a78d0b9f5bab68.tar.gz
tosin-9829bbfcd57c57e237c6aacb96a78d0b9f5bab68.zip
lol no generics
Diffstat (limited to 'src/db/migration/change.rs')
-rw-r--r--src/db/migration/change.rs8
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();
}
}
}