diff --git a/Cargo.lock b/Cargo.lock index 3957ad5..df5f131 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,7 +154,6 @@ dependencies = [ "native-tls", "postgres-native-tls", "serde", - "time", "tokio", "tokio-postgres", "toml", diff --git a/common/Cargo.toml b/common/Cargo.toml index c8da81c..beb9909 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -20,7 +20,6 @@ binascii = "0.1" tokio-postgres = {version = "0.7", default-features = false, optional = true} diesel = {version = "2.0", optional = true, default-features = false, features = ["postgres_backend", "time"]} diesel-async = {version = "0.2", optional = true, features = ["postgres", "bb8"]} -time = "0.3" anyhow = "1.0" [features] diff --git a/common/src/db/mod.rs b/common/src/db/mod.rs index 3558fdb..8f83bbc 100644 --- a/common/src/db/mod.rs +++ b/common/src/db/mod.rs @@ -6,7 +6,6 @@ use std::{collections::HashMap}; use crate::async_drop::{AsyncDropper, AsyncDropGuard}; mod schema_auto; pub mod schema; -pub mod models; use diesel::{upsert::excluded, ExpressionMethods, QueryDsl, NullableExpressionMethods, sql_types::{Array, Binary, VarChar, Integer}, query_builder::{QueryFragment, Query}}; use diesel_async::RunQueryDsl; diff --git a/common/src/db/models.rs b/common/src/db/models.rs deleted file mode 100644 index 9f4456a..0000000 --- a/common/src/db/models.rs +++ /dev/null @@ -1,19 +0,0 @@ -use std::borrow::Cow; -use time::OffsetDateTime; - -use diesel::prelude::*; - -#[derive(Queryable)] -#[diesel(table_name = funcs)] -#[diesel(table_name = func_ranks)] -pub struct Function<'a> { - pub id: i32, - pub name: Cow<'a, str>, - pub len: i32, - pub db_id: i32, - pub chksum: Option>, - pub metadata: Option>, - pub rank: Option, - pub push_dt: Option, - pub update_dt: Option, -}