A fork of attic a self-hostable Nix Binary Cache server
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to sea-orm 1.1

Zhaofeng Li 1964de05 c9152db2

+10 -10
+2 -2
server/Cargo.toml
··· 71 71 ] 72 72 73 73 [dependencies.sea-orm] 74 - version = "0.12.10" 74 + version = "1.1.13" 75 75 features = [ 76 76 "runtime-tokio-rustls", 77 77 "macros", ··· 81 81 ] 82 82 83 83 [dependencies.sea-orm-migration] 84 - version = "0.12.10" 84 + version = "1.1.13" 85 85 86 86 [dependencies.tokio] 87 87 version = "1.46.1"
+1 -1
server/src/database/entity/cache.rs
··· 17 17 pub id: i64, 18 18 19 19 /// Unique name of the cache. 20 - #[sea_orm(column_type = "String(Some(50))", unique, indexed)] 20 + #[sea_orm(column_type = "String(StringLen::N(50))", unique, indexed)] 21 21 pub name: String, 22 22 23 23 /// Signing keypair for the cache.
+2 -2
server/src/database/entity/chunk.rs
··· 9 9 10 10 /// The state of a chunk. 11 11 #[derive(EnumIter, DeriveActiveEnum, Debug, Clone, PartialEq, Eq)] 12 - #[sea_orm(rs_type = "String", db_type = "String(Some(1))")] 12 + #[sea_orm(rs_type = "String", db_type = "String(StringLen::N(1))")] 13 13 pub enum ChunkState { 14 14 /// The chunk can be used. 15 15 /// ··· 81 81 pub file_size: Option<i64>, 82 82 83 83 /// The type of compression in use. 84 - #[sea_orm(column_type = "String(Some(10))")] 84 + #[sea_orm(column_type = "String(StringLen::N(10))")] 85 85 pub compression: String, 86 86 87 87 /// The remote file backing this chunk.
+2 -2
server/src/database/entity/mod.rs
··· 9 9 pub mod object; 10 10 11 11 use sea_orm::entity::Value; 12 - use sea_orm::sea_query::{ArrayType, ColumnType, ValueType, ValueTypeErr}; 12 + use sea_orm::sea_query::{table::StringLen, ArrayType, ColumnType, ValueType, ValueTypeErr}; 13 13 use sea_orm::{DbErr, QueryResult, TryGetError, TryGetable}; 14 14 use serde::{de::DeserializeOwned, Deserialize, Serialize}; 15 15 ··· 49 49 } 50 50 51 51 fn column_type() -> ColumnType { 52 - ColumnType::String(None) 52 + ColumnType::String(StringLen::None) 53 53 } 54 54 55 55 fn array_type() -> ArrayType {
+2 -2
server/src/database/entity/nar.rs
··· 6 6 7 7 /// The state of a NAR. 8 8 #[derive(EnumIter, DeriveActiveEnum, Debug, Clone, PartialEq, Eq)] 9 - #[sea_orm(rs_type = "String", db_type = "String(Some(1))")] 9 + #[sea_orm(rs_type = "String", db_type = "String(StringLen::N(1))")] 10 10 pub enum NarState { 11 11 /// The NAR can be used. 12 12 /// ··· 90 90 pub nar_size: i64, 91 91 92 92 /// The type of compression in use. 93 - #[sea_orm(column_type = "String(Some(10))")] 93 + #[sea_orm(column_type = "String(StringLen::N(10))")] 94 94 pub compression: String, 95 95 96 96 /// Number of chunks that make up this NAR.
+1 -1
server/src/database/entity/object.rs
··· 37 37 pub nar_id: i64, 38 38 39 39 /// The hash portion of the store path. 40 - #[sea_orm(column_type = "String(Some(32))", indexed)] 40 + #[sea_orm(column_type = "String(StringLen::N(32))", indexed)] 41 41 pub store_path_hash: String, 42 42 43 43 /// The full store path being cached, including the store directory.