aboutsummaryrefslogtreecommitdiff
path: root/src/db/backend.rs
diff options
context:
space:
mode:
authorMelody Horn / boringcactus <melody@boringcactus.com>2021-06-16 14:22:50 -0600
committerMelody Horn / boringcactus <melody@boringcactus.com>2021-06-16 14:22:50 -0600
commit58d2f63f4577bc701b6bd655064cefebb65118b4 (patch)
tree0427ac03e6d0d0ed7879aecaa45cd3937939aa4e /src/db/backend.rs
parent685b47247aad71468f190c42929ca6f0dce843fa (diff)
downloadtosin-58d2f63f4577bc701b6bd655064cefebb65118b4.tar.gz
tosin-58d2f63f4577bc701b6bd655064cefebb65118b4.zip
actually run migrations
Diffstat (limited to 'src/db/backend.rs')
-rw-r--r--src/db/backend.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/db/backend.rs b/src/db/backend.rs
index b75d5ca..5f35dd9 100644
--- a/src/db/backend.rs
+++ b/src/db/backend.rs
@@ -1,7 +1,9 @@
+use barrel::backend::SqlGenerator;
pub use diesel::connection::Connection;
pub trait Connectable {
type Connection: Connection;
+ type SqlGenerator: SqlGenerator;
fn connect(&self) -> diesel::ConnectionResult<Self::Connection>;
}
@@ -11,6 +13,7 @@ pub struct Sqlite {
impl Connectable for Sqlite {
type Connection = diesel::sqlite::SqliteConnection;
+ type SqlGenerator = barrel::backend::Sqlite;
fn connect(&self) -> diesel::ConnectionResult<Self::Connection> {
Self::Connection::establish(self.db_file)