mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-13 14:20:07 +00:00
MySQL database
This commit is contained in:
parent
1eb1502a07
commit
42af7c6dab
3 changed files with 5 additions and 22 deletions
|
@ -2,7 +2,7 @@ use std::ops::Deref;
|
|||
|
||||
use diesel::r2d2;
|
||||
use diesel::r2d2::ConnectionManager;
|
||||
use diesel::sqlite::SqliteConnection;
|
||||
use diesel::sqlite::MysqlConnection;
|
||||
use diesel::{Connection as DieselConnection, ConnectionError};
|
||||
|
||||
use rocket::http::Status;
|
||||
|
@ -12,9 +12,9 @@ use rocket::{Outcome, Request, State};
|
|||
use crate::CONFIG;
|
||||
|
||||
/// An alias to the database connection used
|
||||
type Connection = SqliteConnection;
|
||||
type Connection = MysqlConnection;
|
||||
|
||||
/// An alias to the type for a pool of Diesel SQLite connections.
|
||||
/// An alias to the type for a pool of Diesel MySQL connections.
|
||||
type Pool = r2d2::Pool<ConnectionManager<Connection>>;
|
||||
|
||||
/// Connection request guard type: a wrapper around an r2d2 pooled connection.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue