Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ base64 = "=0.22.1"
bigdecimal = { version = "=0.4.5", features = ["serde"] }
cargo-manifest = "=0.15.2"
crates_io_cdn_logs = { path = "crates/crates_io_cdn_logs" }
crates_io_database = { path = "crates/crates_io_database" }
crates_io_env_vars = { path = "crates/crates_io_env_vars" }
crates_io_github = { path = "crates/crates_io_github" }
crates_io_index = { path = "crates/crates_io_index" }
Expand Down
12 changes: 12 additions & 0 deletions crates/crates_io_database/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "crates_io_database"
version = "0.0.0"
license = "MIT OR Apache-2.0"
edition = "2021"

[lints]
workspace = true

[dependencies]
diesel = "=2.2.4"
diesel_full_text_search = "=2.2.0"
1 change: 1 addition & 0 deletions crates/crates_io_database/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod schema;
10 changes: 5 additions & 5 deletions src/schema.patch → crates/crates_io_database/src/schema.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- src/schema.rs.orig 2024-03-04 10:34:35
+++ src/schema.rs 2024-03-04 10:33:35
--- crates/crates_io_database/schema.rs.orig 2024-03-04 10:34:35
+++ crates/crates_io_database/schema.rs 2024-03-04 10:33:35
@@ -21,9 +21,7 @@
/// The `pg_catalog.tsvector` SQL type
///
Expand All @@ -9,7 +9,7 @@
- pub struct Tsvector;
+ pub use diesel_full_text_search::Tsvector;
}

diesel::table! {
@@ -74,9 +72,9 @@
/// (Automatically generated by Diesel.)
Expand All @@ -35,7 +35,7 @@
- path -> Ltree,
}
}

@@ -476,7 +468,7 @@
/// Its SQL type is `Array<Nullable<Text>>`.
///
Expand All @@ -47,7 +47,7 @@
/// Its SQL type is `Nullable<Varchar>`.
@@ -703,6 +695,24 @@
}

diesel::table! {
+ /// Representation of the `recent_crate_downloads` view.
+ ///
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions diesel.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# For documentation on how to configure this file,
# see diesel.rs/guides/configuring-diesel-cli
[print_schema]
file = "src/schema.rs"
file = "crates/crates_io_database/src/schema.rs"
with_docs = true
patch_file = "src/schema.patch"
patch_file = "crates/crates_io_database/src/schema.patch"
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extern crate serde_json;
extern crate tracing;

pub use crate::{app::App, email::Emails};
pub use crates_io_database::schema;
use std::sync::Arc;

use crate::app::AppState;
Expand Down Expand Up @@ -49,7 +50,6 @@ pub mod models;
pub mod rate_limiter;
mod real_ip;
mod router;
pub mod schema;
pub mod sentry;
pub mod sql;
pub mod sqs;
Expand Down
Loading