diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-16 14:22:50 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-16 14:22:50 -0600 |
commit | 58d2f63f4577bc701b6bd655064cefebb65118b4 (patch) | |
tree | 0427ac03e6d0d0ed7879aecaa45cd3937939aa4e /src/db/backend.rs | |
parent | 685b47247aad71468f190c42929ca6f0dce843fa (diff) | |
download | tosin-58d2f63f4577bc701b6bd655064cefebb65118b4.tar.gz tosin-58d2f63f4577bc701b6bd655064cefebb65118b4.zip |
actually run migrations
Diffstat (limited to 'src/db/backend.rs')
-rw-r--r-- | src/db/backend.rs | 3 |
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) |