From 2fd402e32e01c852532d612bb37e3c0ab77e8f3c Mon Sep 17 00:00:00 2001 From: Naim A <227396+naim94a@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:48:50 +0000 Subject: [PATCH] common: delete unused models module --- Cargo.lock | 1 - common/Cargo.toml | 1 - common/src/db/mod.rs | 1 - common/src/db/models.rs | 19 ------------------- 4 files changed, 22 deletions(-) delete mode 100644 common/src/db/models.rs 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, -}