mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-19 10:03:56 +00:00
Misc changes.
Some small changes in general: - Moved the SQL Version check struct into the function. - Updated hadolint to 2.0.0 - Fixed hadolint 2.0.0 warnings - Updated github workflows - Added .editorconfig for some general shared editor settings.
This commit is contained in:
parent
9b2234fa0e
commit
9caf4bf383
12 changed files with 47 additions and 23 deletions
|
@ -241,15 +241,15 @@ pub fn backup_database() -> Result<(), Error> {
|
|||
}
|
||||
|
||||
|
||||
use diesel::sql_types::Text;
|
||||
#[derive(QueryableByName,Debug)]
|
||||
struct SqlVersion {
|
||||
#[sql_type = "Text"]
|
||||
version: String,
|
||||
}
|
||||
|
||||
/// Get the SQL Server version
|
||||
pub fn get_sql_server_version(conn: &DbConn) -> String {
|
||||
use diesel::sql_types::Text;
|
||||
#[derive(QueryableByName)]
|
||||
struct SqlVersion {
|
||||
#[sql_type = "Text"]
|
||||
version: String,
|
||||
}
|
||||
|
||||
db_run! {@raw conn:
|
||||
postgresql, mysql {
|
||||
match diesel::sql_query("SELECT version() AS version;").get_result::<SqlVersion>(conn).ok() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue