diff --git a/Cargo.lock b/Cargo.lock index 2a432feeb..651b79d51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,6 +108,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", + "const-random", "getrandom 0.3.4", "once_cell", "version_check", @@ -217,9 +218,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "api-model" @@ -229,7 +230,7 @@ dependencies = [ "parse-display 0.11.0", "serde", "serde_json", - "thiserror 2.0.18", + "thiserror 2.0.19", "utoipa", ] @@ -325,6 +326,165 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +[[package]] +name = "arrow" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd47f2a6ddc39244bd722a27ee5da66c03369d087b9e024eafdb03e98b98ea7" +dependencies = [ + "arrow-arith", + "arrow-array", + "arrow-buffer", + "arrow-cast", + "arrow-data", + "arrow-ord", + "arrow-row", + "arrow-schema", + "arrow-select", + "arrow-string", +] + +[[package]] +name = "arrow-arith" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c7bbd679c5418b8639b92be01f361d60013c4906574b578b77b63c78356594c" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "chrono", + "num-traits", +] + +[[package]] +name = "arrow-array" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8a4ab47b3f3eac60f7fd31b81e9028fda018607bcc63451aca4f2b755269862" +dependencies = [ + "ahash 0.8.12", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "chrono", + "half", + "hashbrown 0.16.1", + "num-complex", + "num-integer", + "num-traits", +] + +[[package]] +name = "arrow-buffer" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d18b89b4c4f4811d0858175e79541fe98e33e18db3b011708bc287b1240593f" +dependencies = [ + "bytes", + "half", + "num-bigint", + "num-traits", +] + +[[package]] +name = "arrow-cast" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "722b5c41dd1d14d0a879a1bce92c6fe33f546101bb2acce57a209825edd075b3" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-ord", + "arrow-schema", + "arrow-select", + "atoi", + "base64", + "chrono", + "half", + "lexical-core", + "num-traits", + "ryu", +] + +[[package]] +name = "arrow-data" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1683705c63dcf0d18972759eda48489028cbbff67af7d6bef2c6b7b74ab778a" +dependencies = [ + "arrow-buffer", + "arrow-schema", + "half", + "num-integer", + "num-traits", +] + +[[package]] +name = "arrow-ord" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "082342947d4e5a2bcccf029a0a0397e21cb3bb8421edd9571d34fb5dd2670256" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "arrow-select", +] + +[[package]] +name = "arrow-row" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a931b520a2a5e22033e01a6f2486b4cdc26f9106b759abeebc320f125e94d7" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "half", +] + +[[package]] +name = "arrow-schema" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4cf0d4a6609679e03002167a61074a21d7b1ad9ea65e462b2c0a97f8a3b2bc6" + +[[package]] +name = "arrow-select" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b320d86a9806923663bb0fd9baa65ecaba81cb0cd77ff8c1768b9716b4ef891" +dependencies = [ + "ahash 0.8.12", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "num-traits", +] + +[[package]] +name = "arrow-string" +version = "57.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b493e99162e5764077e7823e50ba284858d365922631c7aaefe9487b1abd02c2" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "arrow-select", + "memchr", + "num-traits", + "regex", + "regex-syntax 0.8.11", +] + [[package]] name = "as-any" version = "0.3.2" @@ -352,7 +512,7 @@ dependencies = [ "nom 7.1.3", "num-traits", "rusticata-macros", - "thiserror 2.0.18", + "thiserror 2.0.19", "time", ] @@ -364,7 +524,7 @@ checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", "synstructure", ] @@ -376,7 +536,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -421,7 +581,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -443,18 +603,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "async-trait" -version = "0.1.89" +version = "0.1.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] @@ -498,9 +658,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "aws-lc-rs" -version = "1.17.1" +version = "1.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4342d8937fc7e5dd9b1c60292261c0670c882a2cd1719cfc11b1af41731e32ad" +checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -509,9 +669,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.42.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9ceb1da931507a12f4fccea479dccd00da1943e1b4ae72d8e502d707361444" +checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c" dependencies = [ "cc", "cmake", @@ -606,7 +766,7 @@ checksum = "7aa268c23bfbbd2c4363b9cd302a4f504fb2a9dfe7e3451d66f35dd392e20aca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -685,7 +845,7 @@ checksum = "7b9a5040dce49a7642c97ccb1ae59567098967b5d52c29773f1299a42d23bb39" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -737,7 +897,7 @@ version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "cexpr", "clang-sys", "itertools 0.13.0", @@ -746,7 +906,7 @@ dependencies = [ "regex", "rustc-hash", "shlex 1.3.0", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -766,21 +926,20 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitcoin-consensus-encoding" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2d6094e2a1ba3c93b5a596fe5a10d1a10c3c6e06785cde89f693a044c01aa40" +checksum = "207311705279250ba465076a1bac4b1ac982855fff73fc5f67e22158ac58cdc9" dependencies = [ "bitcoin-internals", + "hex-conservative 1.2.0", + "serde", ] [[package]] name = "bitcoin-internals" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a30a22d1f112dde8e16be7b45c63645dc165cef254f835b3e1e9553e485cfa64" -dependencies = [ - "hex-conservative 0.3.2", -] +checksum = "d573f4cf32996a8dce612e4348cece65a241f1882ed594047c9ba348e8869fa5" [[package]] name = "bitcoin-io" @@ -818,8 +977,8 @@ checksum = "f2c044f98f86f15414668d6c8187c7e4fadab1ad2b31680f648703e0fe07c555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", - "thiserror 2.0.18", + "syn 2.0.119", + "thiserror 2.0.19", ] [[package]] @@ -830,9 +989,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" dependencies = [ "serde_core", ] @@ -960,9 +1119,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145" +checksum = "a88b7ea17d208c4193f2c1e6de3c35fe71f98c96982d5ced308bdcc749ff6e1f" dependencies = [ "borsh-derive", "bytes", @@ -971,15 +1130,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae8fb4fb5740e4b2c4884ff95f5f32f5e8479db1e8fd8eb49ddbe09eb09bb7c" +checksum = "d8f347189c62a579b8cd5f80714efa178f52e461dc2e6d701d264f5ff22e566c" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -1014,9 +1173,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.12.3" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cee35f73844aa3014bb606320a6c1f010249dbdf43342fe54b5a4f6a8ed4b79" +checksum = "1f7dc094d718f2e1c1559ad110e27eeaae14a5465d3d56dd6dbd793079fbd530" dependencies = [ "memchr", "regex-automata", @@ -1102,14 +1261,14 @@ checksum = "89385e82b5d1821d2219e0b095efa2cc1f246cbf99080f3be46a1a85c0d392d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "bytemuck" -version = "1.25.1" +version = "1.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6aedf8ae72766347502cf3cb4f41cf5e9cc37d28bee90f1fdaaae15f9cf9424" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" [[package]] name = "byteorder" @@ -1140,7 +1299,7 @@ dependencies = [ "hex", "idgenerator", "rand 0.10.2", - "sea-orm", + "sea-orm 2.0.0", "serde", "sha2 0.11.0", ] @@ -1184,9 +1343,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.67" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38" +checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8" dependencies = [ "find-msvc-tools", "jobserver", @@ -1211,7 +1370,7 @@ dependencies = [ "serde_json", "serde_with", "smol_str", - "thiserror 2.0.18", + "thiserror 2.0.19", ] [[package]] @@ -1238,7 +1397,7 @@ dependencies = [ "serde_with", "smol_str", "stacker", - "thiserror 2.0.18", + "thiserror 2.0.19", "unicode-security", ] @@ -1323,9 +1482,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "chacha20" @@ -1400,9 +1559,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.1" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +checksum = "d91e0c145792ef73a6ad36d27c75ac09f1832222a3c209689d90f534685ee5b7" dependencies = [ "clap_builder", "clap_derive", @@ -1410,9 +1569,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" dependencies = [ "anstream", "anstyle", @@ -1422,14 +1581,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.1" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] @@ -1509,11 +1668,11 @@ dependencies = [ "redis", "regex", "rkyv 0.8.17", - "sea-orm", + "sea-orm 2.0.0", "serde", "serde_json", - "thiserror 2.0.18", - "toml 1.1.2+spec-1.1.0", + "thiserror 2.0.19", + "toml 1.1.3+spec-1.1.0", ] [[package]] @@ -1561,7 +1720,7 @@ dependencies = [ "serde-untagged", "serde_core", "serde_json", - "toml 1.1.2+spec-1.1.0", + "toml 1.1.3+spec-1.1.0", "winnow 1.0.4", "yaml-rust2", ] @@ -1932,15 +2091,16 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "5.0.0-rc.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f359e08ca85e7bd759e1fd933ff2bccd81864c60a8fba0e259c7f822b0924bf" +checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23" dependencies = [ "cfg-if", "cpufeatures 0.3.0", "curve25519-dalek-derive", "digest 0.11.3", "fiat-crypto 0.3.0", + "rand_core 0.10.1", "rustc_version", "subtle", "zeroize", @@ -1954,7 +2114,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2014,7 +2174,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2027,7 +2187,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2038,7 +2198,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2049,7 +2209,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2114,7 +2274,7 @@ dependencies = [ "defmt-parser", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2123,7 +2283,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" dependencies = [ - "thiserror 2.0.18", + "thiserror 2.0.19", ] [[package]] @@ -2134,7 +2294,7 @@ checksum = "780eb241654bf097afb00fc5f054a09b687dad862e485fdcf8399bb056565370" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2193,6 +2353,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-where" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "derive_arbitrary" version = "1.4.2" @@ -2201,7 +2372,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2222,7 +2393,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2232,7 +2403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2245,7 +2416,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2267,7 +2438,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.118", + "syn 2.0.119", "unicode-xid", ] @@ -2326,7 +2497,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6e616b67e0e0057a0952ef9991d66300044b897b879ef6fa89851495065b35" dependencies = [ "sysinfo 0.35.2", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", ] @@ -2357,7 +2528,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "block2", "libc", "objc2", @@ -2371,7 +2542,7 @@ checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2446,14 +2617,14 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.17.0-rc.18" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54fb064faabbee66e1fc8e5c5a9458d4269dc2d8b638fe86a425adb2510d1a96" +checksum = "c0681a4fc24c767085329728d8dfba959af91228aa4610cca4f8ce317ba46ae0" dependencies = [ "der 0.8.1", "digest 0.11.3", - "elliptic-curve 0.14.0-rc.33", - "rfc6979 0.5.0", + "elliptic-curve 0.14.1", + "rfc6979 0.6.0", "signature 3.0.0", "spki 0.8.0", "zeroize", @@ -2496,11 +2667,11 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "3.0.0-rc.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011170fe4f04665565b4110afef66774fe9ffff278f3eb5b81cc73d26e27d60" +checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de" dependencies = [ - "curve25519-dalek 5.0.0-rc.0", + "curve25519-dalek 5.0.0", "ed25519 3.0.0", "rand_core 0.10.1", "serde", @@ -2519,7 +2690,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2558,9 +2729,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.14.0-rc.33" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102d3643d30dd8b559613c5cced68317199597fffb278cdc88daa2ef7fafc935" +checksum = "9d65aa39b3a5c1c9c1b745c9a019234bb7a21b77abcb4f4d266d706e2d577d65" dependencies = [ "base16ct 1.0.0", "crypto-bigint 0.7.5", @@ -2570,7 +2741,6 @@ dependencies = [ "group 0.14.0", "hkdf 0.13.0", "hybrid-array", - "once_cell", "pem-rfc7468 1.0.0", "pkcs8 0.11.0", "rand_core 0.10.1", @@ -2648,7 +2818,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2668,7 +2838,7 @@ checksum = "42e528e2d34ba8a67a1a650b86beae8ef69fc5fdb638016f386b973226590432" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2680,7 +2850,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2769,6 +2939,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "etcetera" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de48cc4d1c1d97a20fd819def54b890cadde72ed3ad0c614822a0a433361be96" +dependencies = [ + "cfg-if", + "windows-sys 0.61.2", +] + [[package]] name = "event-listener" version = "5.4.1" @@ -2794,9 +2974,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" [[package]] name = "ff" @@ -2866,6 +3046,17 @@ dependencies = [ "spin 0.9.9", ] +[[package]] +name = "flume" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e139bc46ca777eb5efaf62df0ab8cc5fd400866427e56c68b22e414e53bd3be" +dependencies = [ + "futures-core", + "futures-sink", + "spin 0.9.9", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2941,9 +3132,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218" dependencies = [ "futures-channel", "futures-core", @@ -2956,9 +3147,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" dependencies = [ "futures-core", "futures-sink", @@ -2966,15 +3157,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" [[package]] name = "futures-executor" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" dependencies = [ "futures-core", "futures-task", @@ -2994,38 +3185,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" [[package]] name = "futures-macro" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "futures-sink" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ "futures-channel", "futures-core", @@ -3124,7 +3315,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eecf2d5dc9b66b732b97707a0210906b1d30523eb773193ab777c0c84b3e8d5" dependencies = [ - "polyval 0.7.2", + "polyval 0.7.3", ] [[package]] @@ -3157,13 +3348,13 @@ dependencies = [ "num_cpus", "path-absolutize", "rayon", - "sea-orm", + "sea-orm 1.1.20", "serde", "sha1 0.10.7", "sha2 0.10.9", "similar 2.7.0", "tempfile", - "thiserror 2.0.18", + "thiserror 2.0.19", "threadpool", "tokio", "tokio-stream", @@ -3204,14 +3395,14 @@ dependencies = [ "rayon", "ring", "rkyv 0.8.17", - "sea-orm", + "sea-orm 1.1.20", "serde", "serde_json", "sha1 0.11.0", "sha2 0.11.0", "similar 3.1.1", "tempfile", - "thiserror 2.0.18", + "thiserror 2.0.19", "threadpool", "tokio", "tokio-stream", @@ -3223,15 +3414,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" [[package]] name = "globset" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" +checksum = "e47d37d2ae4464254884b60ab7071be2b876a9c35b696bd018ddcc76847309cd" dependencies = [ "aho-corasick", "bstr", @@ -3299,6 +3490,18 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -3385,7 +3588,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -3499,9 +3702,9 @@ dependencies = [ [[package]] name = "hex-conservative" -version = "0.3.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830e599c2904b08f0834ee6337d8fe8f0ed4a63b5d9e7a7f49c0ffa06d08d360" +checksum = "35431185f361ccf3ffc58254628af5f1f5d5f28531da2e02e5d6c82bbc282a10" dependencies = [ "arrayvec 0.7.8", ] @@ -3628,9 +3831,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" dependencies = [ "atomic-waker", "bytes", @@ -3661,7 +3864,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.8", + "webpki-roots 1.0.9", ] [[package]] @@ -3909,15 +4112,24 @@ dependencies = [ "web-time", ] +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] + [[package]] name = "inherent" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c727f80bfa4a6c6e2508d2f05b6f4bfce242030bd88ed15ae5331c5b5d30fba7" +checksum = "bee2c455ca60511a054699102d40ce7153621cb2429558f9eaa600e4499b5984" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] @@ -4010,7 +4222,7 @@ dependencies = [ "reqwest 0.13.4", "serde", "serde_json", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "tracing", "tracing-subscriber", @@ -4092,11 +4304,12 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.32" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961d16382652bfdd8c6f68b223b26a8c93e0d475c672f414411db31c6c5c900e" +checksum = "e184d09547b80eb7e20d141ba2fb1fbac843ca53f4cf1b31210adc4c1adc6e16" dependencies = [ "defmt", + "jiff-core", "jiff-static", "log", "portable-atomic", @@ -4104,15 +4317,25 @@ dependencies = [ "serde_core", ] +[[package]] +name = "jiff-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09" +dependencies = [ + "defmt", +] + [[package]] name = "jiff-static" -version = "0.2.32" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0879bd39df99c4c5e2c6615ccc026391a423dde10532c573e6086eb94a802cc" +checksum = "323da076b7a6faf914dc677cb05a4b907742ff7375c8322c9e7f5061e5e0e9de" dependencies = [ + "jiff-core", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -4127,7 +4350,7 @@ dependencies = [ "jni-sys", "log", "simd_cesu8", - "thiserror 2.0.18", + "thiserror 2.0.19", "walkdir", "windows-link 0.2.1", ] @@ -4142,7 +4365,7 @@ dependencies = [ "quote", "rustc_version", "simd_cesu8", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -4161,7 +4384,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -4224,7 +4447,7 @@ dependencies = [ "rsa 0.9.10", "rustls", "saturn", - "sea-orm", + "sea-orm 2.0.0", "serde", "serde_json", "sha1 0.11.0", @@ -4243,7 +4466,7 @@ dependencies = [ "callisto", "chrono", "common", - "sea-orm", + "sea-orm 2.0.0", "sea-orm-migration", "serde_json", "tempfile", @@ -4295,9 +4518,9 @@ dependencies = [ [[package]] name = "kstring" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1" +checksum = "b609e7ca5ea38f093c20a4a102335b247221c9643b7a6bc3510f196f99499a9e" dependencies = [ "serde", "static_assertions", @@ -4318,7 +4541,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "333f77a20344a448f3f70664918135fddeb804e938f28a99d685bd92926e0b19" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "kvm-bindings", "libc", "vmm-sys-util 0.15.0", @@ -4392,6 +4615,63 @@ dependencies = [ "url", ] +[[package]] +name = "lexical-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d8d125a277f807e55a77304455eb7b1cb52f2b18c143b60e766c120bd64a594" +dependencies = [ + "lexical-parse-float", + "lexical-parse-integer", + "lexical-util", + "lexical-write-float", + "lexical-write-integer", +] + +[[package]] +name = "lexical-parse-float" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52a9f232fbd6f550bc0137dcb5f99ab674071ac2d690ac69704593cb4abbea56" +dependencies = [ + "lexical-parse-integer", + "lexical-util", +] + +[[package]] +name = "lexical-parse-integer" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a7a039f8fb9c19c996cd7b2fcce303c1b2874fe1aca544edc85c4a5f8489b34" +dependencies = [ + "lexical-util", +] + +[[package]] +name = "lexical-util" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2604dd126bb14f13fb5d1bd6a66155079cb9fa655b37f875b3a742c705dbed17" + +[[package]] +name = "lexical-write-float" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c438c87c013188d415fbabbb1dceb44249ab81664efbd31b14ae55dabb6361" +dependencies = [ + "lexical-util", + "lexical-write-integer", +] + +[[package]] +name = "lexical-write-integer" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "409851a618475d2d5796377cad353802345cba92c867d9fbcde9cf4eac4e14df" +dependencies = [ + "lexical-util", +] + [[package]] name = "libbz2-rs-sys" version = "0.2.5" @@ -4400,9 +4680,9 @@ checksum = "34b357333733e8260735ba5894eb928c02ecc69c78715f01a8019e7fa7f2db4c" [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libcrux-intrinsics" @@ -4477,7 +4757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "818b22fed635a8c39500037246a136595ac01fdc00c029dce59b42f6bd800f39" dependencies = [ "async-trait", - "bitflags 2.13.0", + "bitflags 2.13.1", "bytes", "clap", "futures", @@ -4532,7 +4812,7 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "libc", "plain", "redox_syscall 0.9.0", @@ -4714,7 +4994,7 @@ dependencies = [ "quote", "regex-automata", "regex-syntax 0.8.11", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -4852,7 +5132,7 @@ checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -4970,7 +5250,6 @@ dependencies = [ "clap", "common", "ctrlc", - "ed25519-dalek 2.2.0", "futures", "git-internal 0.8.3", "http", @@ -4987,7 +5266,7 @@ dependencies = [ "rand 0.10.2", "regex", "reqwest 0.13.4", - "russh 0.61.2", + "russh 0.62.3", "saturn", "serde", "serde_json", @@ -5034,7 +5313,7 @@ checksum = "4568f25ccbd45ab5d5603dc34318c1ec56b117531781260002151b8530a9f931" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -5090,7 +5369,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "cfg-if", "cfg_aliases", "libc", @@ -5103,7 +5382,7 @@ version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "cfg-if", "cfg_aliases", "libc", @@ -5184,6 +5463,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + [[package]] name = "num-conv" version = "0.2.2" @@ -5247,7 +5535,7 @@ checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -5271,7 +5559,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "dispatch2", "objc2", ] @@ -5288,7 +5576,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "objc2", ] @@ -5324,9 +5612,9 @@ dependencies = [ [[package]] name = "object_store" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765784b4390c6bcf80316e5a22f4e3661b639c9d8c83246856643c27d8ce9dbe" +checksum = "d354792e39fa5f0009e47623cf8b15b099bf9a652fa55c6f817fe28ac84fea50" dependencies = [ "async-trait", "aws-lc-rs", @@ -5354,7 +5642,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "tracing", "url", @@ -5409,7 +5697,7 @@ version = "0.10.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "cfg-if", "foreign-types", "libc", @@ -5425,7 +5713,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -5563,7 +5851,7 @@ dependencies = [ "io-orbit", "once_cell", "rand 0.10.2", - "sea-orm", + "sea-orm 2.0.0", "serde", "serde_json", "tempfile", @@ -5609,7 +5897,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -5626,14 +5914,14 @@ dependencies = [ [[package]] name = "p256" -version = "0.14.0-rc.10" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41adc63effe99d48837a8cc0e6d7a77e32ae6a07f6000df466178dbc2193093e" +checksum = "d2c9239b2dbc807adbbe147e8cf72ea7450c3a0aabe62cb8e75ff4ec22e1f72a" dependencies = [ - "ecdsa 0.17.0-rc.18", - "elliptic-curve 0.14.0-rc.33", + "ecdsa 0.17.0", + "elliptic-curve 0.14.1", "primefield", - "primeorder 0.14.0-rc.10", + "primeorder 0.14.0", "sha2 0.11.0", ] @@ -5651,15 +5939,15 @@ dependencies = [ [[package]] name = "p384" -version = "0.14.0-rc.10" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd5333afa5ae0347f39e6a0f2c9c155da431583fd71fe5555bd0521b4ccaf02" +checksum = "d17b851e6b3e378ab4ecb07fa2ed23f4d15f075735f8fec9fa1e7bdce5f8301f" dependencies = [ - "ecdsa 0.17.0-rc.18", - "elliptic-curve 0.14.0-rc.33", + "ecdsa 0.17.0", + "elliptic-curve 0.14.1", "fiat-crypto 0.3.0", "primefield", - "primeorder 0.14.0-rc.10", + "primeorder 0.14.0", "sha2 0.11.0", ] @@ -5679,15 +5967,15 @@ dependencies = [ [[package]] name = "p521" -version = "0.14.0-rc.10" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a5297f53dc16d35909060ba3032cff7867e8809f01e273ff325579d5f0ceae" +checksum = "4ad64cc32c2dc466317c12ee5853e61f159f9eab1fe7efade0395dc2e7b43449" dependencies = [ "base16ct 1.0.0", - "ecdsa 0.17.0-rc.18", - "elliptic-curve 0.14.0-rc.33", + "ecdsa 0.17.0", + "elliptic-curve 0.14.1", "primefield", - "primeorder 0.14.0-rc.10", + "primeorder 0.14.0", "sha2 0.11.0", ] @@ -5705,7 +5993,7 @@ dependencies = [ "log", "rand 0.10.2", "sha2 0.11.0", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "windows 0.62.2", "windows-strings 0.5.1", @@ -5799,7 +6087,7 @@ dependencies = [ "regex", "regex-syntax 0.7.5", "structmeta 0.2.0", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -5813,7 +6101,7 @@ dependencies = [ "regex", "regex-syntax 0.8.11", "structmeta 0.3.0", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -5956,7 +6244,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -6099,7 +6387,7 @@ checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -6197,6 +6485,16 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +[[package]] +name = "pluralizer" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b3eba432a00a1f6c16f39147847a870e94e2e9b992759b503e330efec778cbe" +dependencies = [ + "once_cell", + "regex", +] + [[package]] name = "poly1305" version = "0.8.0" @@ -6233,9 +6531,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20f20e954175de5f463f67781b35583397d916b1d148738923711b2ad16bee8" +checksum = "f0fa31d631f2b2cb2a544d0aa321ce847a94764d701ca2becc411138b93d49cd" dependencies = [ "cpubits", "cpufeatures 0.3.0", @@ -6244,9 +6542,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3" [[package]] name = "portable-atomic-util" @@ -6305,7 +6603,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -6333,11 +6631,15 @@ dependencies = [ [[package]] name = "primeorder" -version = "0.14.0-rc.10" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d2793f22b9b6fd11ef3ac1d59bf003c2573593e4968702341605c2748fd90bf" +checksum = "5c9f42978c78a00e3d68f69fc03e57a234debae69da4020a4fb588fcdcd07b06" dependencies = [ - "elliptic-curve 0.14.0-rc.33", + "elliptic-curve 0.14.1", + "once_cell", + "primefield", + "serdect 0.4.3", + "wnaf", ] [[package]] @@ -6357,7 +6659,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.12+spec-1.1.0", + "toml_edit 0.25.13+spec-1.1.0", ] [[package]] @@ -6379,14 +6681,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -6399,7 +6701,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", "version_check", "yansi", ] @@ -6430,7 +6732,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.118", + "syn 2.0.119", "tempfile", ] @@ -6444,7 +6746,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -6503,7 +6805,7 @@ checksum = "7347867d0a7e1208d93b46767be83e2b8f978c3dad35f775ac8d8847551d6fe1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -6601,9 +6903,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2474bd2e5029e7ccb6abb2ba48cf2383a333851dedf495901544281590c7da7f" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" dependencies = [ "memchr", "serde", @@ -6623,7 +6925,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2 0.6.5", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "tracing", "web-time", @@ -6646,7 +6948,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.18", + "thiserror 2.0.19", "tinyvec", "tracing", "web-time", @@ -6668,9 +6970,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -6835,9 +7137,9 @@ dependencies = [ [[package]] name = "redis" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fa6f8e4b491d7a8ef3a9550a4d71969bd0064f46e32b8dbbcc7fc60dad94fed" +checksum = "b0b9503711b03773e43b31668c7b5bd279ee7cd9b7d18cff7c23a42cc1d08e5a" dependencies = [ "arc-swap", "arcstr", @@ -6892,7 +7194,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", ] [[package]] @@ -6901,7 +7203,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5102a6aaa05aa011a238e178e6bca86d2cb56fc9f586d37cb80f5bca6e07759" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", ] [[package]] @@ -6912,34 +7214,34 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.17", "libredox", - "thiserror 2.0.18", + "thiserror 2.0.19", ] [[package]] name = "ref-cast" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] name = "regex" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" dependencies = [ "aho-corasick", "memchr", @@ -6949,9 +7251,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f388202e4b80542a0921078cc23b6333bcf1409c1e3f86404cae4766a6131db" +checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" dependencies = [ "aho-corasick", "memchr", @@ -7037,7 +7339,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.8", + "webpki-roots 1.0.9", ] [[package]] @@ -7096,12 +7398,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5236ce872cac07e0fb3969b0cbf468c7d2f37d432f1b627dcb7b8d34563fb0c3" +checksum = "b4a459cddafb3fe76b31fd8f1108007566c40301feb64dc7b54656eb7388172b" dependencies = [ + "crypto-bigint 0.7.5", "hmac 0.13.0", - "subtle", ] [[package]] @@ -7207,7 +7509,7 @@ checksum = "c0ed1a78a1b19d184b0daa629dd9a024573173ec7d485b287cb369fb3607cc1c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -7216,7 +7518,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81116b9531d61eabc41aeb228e4b6b2435bcca3233b98cf3b3077d4e6e9debb3" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "once_cell", "serde", "serde_derive", @@ -7272,7 +7574,7 @@ checksum = "82b4d036bb45d7bbe99dbfef4ec60eaeb614708d22ff107124272f8ef6b54548" dependencies = [ "aes 0.8.4", "aws-lc-rs", - "bitflags 2.13.0", + "bitflags 2.13.1", "block-padding 0.3.3", "byteorder", "bytes", @@ -7328,13 +7630,13 @@ dependencies = [ [[package]] name = "russh" -version = "0.61.2" +version = "0.62.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf893f64684e58da8a68d56a5e84d1cf0440226274c515770fe267707a7d0b0" +checksum = "059dd24c0fe20721639f7acad7b82cd51ec3dd3254ed8cf7a0b7df6c20eaff1c" dependencies = [ "aes 0.9.1", "aws-lc-rs", - "bitflags 2.13.0", + "bitflags 2.13.1", "block-padding 0.4.2", "byteorder", "bytes", @@ -7342,14 +7644,14 @@ dependencies = [ "cipher 0.5.2", "crypto-bigint 0.7.5", "ctr 0.10.1", - "curve25519-dalek 5.0.0-rc.0", + "curve25519-dalek 5.0.0", "data-encoding", "delegate", "der 0.8.1", "digest 0.11.3", - "ecdsa 0.17.0-rc.18", - "ed25519-dalek 3.0.0-rc.0", - "elliptic-curve 0.14.0-rc.33", + "ecdsa 0.17.0", + "ed25519-dalek 3.0.0", + "elliptic-curve 0.14.1", "enum_dispatch", "flate2", "futures", @@ -7366,32 +7668,32 @@ dependencies = [ "ml-kem", "module-lattice", "num-bigint", - "p256 0.14.0-rc.10", - "p384 0.14.0-rc.10", - "p521 0.14.0-rc.10", + "p256 0.14.0", + "p384 0.14.0", + "p521 0.14.0", "pageant", "pbkdf2 0.13.0", "pkcs1 0.8.0-rc.4", "pkcs5 0.8.1", "pkcs8 0.11.0", - "polyval 0.7.2", + "polyval 0.7.3", "rand 0.10.2", "rand_core 0.10.1", "rsa 0.10.0-rc.18", - "russh-cryptovec 0.61.0", + "russh-cryptovec 0.62.0", "russh-util", "salsa20 0.11.0", "scrypt 0.12.0", "sec1 0.8.1", "sha1 0.11.0", "sha2 0.11.0", - "sha3 0.11.0", + "sha3 0.12.0", "signature 3.0.0", "spki 0.8.0", - "ssh-encoding 0.3.0-rc.9", + "ssh-encoding 0.3.0", "ssh-key", "subtle", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "typenum", "universal-hash 0.6.1", @@ -7413,13 +7715,13 @@ dependencies = [ [[package]] name = "russh-cryptovec" -version = "0.61.0" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443f6bbcfacb34a1aab2b12b99bf08e0c63abdc5a0db261901365df9d57fff51" +checksum = "3aec6cb630dbe85d72ffd7bcd95f07e1bd69f9f270ee8adfa1afe443a6331438" dependencies = [ "log", "nix 0.31.3", - "ssh-encoding 0.3.0-rc.9", + "ssh-encoding 0.3.0", "windows-sys 0.61.2", ] @@ -7429,7 +7731,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed8949eca4163c18a8f59ff96d32cf61e9c13b9735e21ef32b3907f4aafa1a9" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "bytes", "chrono", "dashmap 6.2.1", @@ -7437,7 +7739,7 @@ dependencies = [ "log", "serde", "serde_bytes", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "tokio-util", "wasm-bindgen-futures", @@ -7476,7 +7778,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.118", + "syn 2.0.119", "walkdir", ] @@ -7553,7 +7855,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "errno", "libc", "linux-raw-sys 0.4.15", @@ -7566,7 +7868,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "errno", "libc", "linux-raw-sys 0.12.1", @@ -7705,11 +8007,10 @@ version = "0.1.0" dependencies = [ "cedar-policy", "itertools 0.15.0", - "lazy_static", "regex", "serde", "serde_json", - "thiserror 2.0.18", + "thiserror 2.0.19", "tracing", "tracing-subscriber", ] @@ -7782,13 +8083,13 @@ dependencies = [ "serde", "serde_json", "sled", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "toml 0.9.12+spec-1.1.0", "tracing", "tracing-subscriber", "uuid", - "whoami", + "whoami 1.6.1", ] [[package]] @@ -7816,15 +8117,14 @@ dependencies = [ [[package]] name = "sea-bae" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f694a6ab48f14bc063cfadff30ab551d3c7e46d8f81836c51989d548f44a2a25" +checksum = "260bbc7148a8d6818ac5032a1b9970da1a68bdd723d45b12d59f7c1bf3565e24" dependencies = [ "heck 0.4.1", - "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -7844,14 +8144,14 @@ dependencies = [ "ouroboros", "pgvector", "rust_decimal", - "sea-orm-macros", - "sea-query", + "sea-orm-macros 1.1.20", + "sea-query 0.32.7", "sea-query-binder", "serde", "serde_json", - "sqlx", + "sqlx 0.8.6", "strum 0.26.3", - "thiserror 2.0.18", + "thiserror 2.0.19", "time", "tracing", "url", @@ -7859,23 +8159,72 @@ dependencies = [ ] [[package]] -name = "sea-orm-cli" -version = "1.1.20" +name = "sea-orm" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da80ebcdb44571e86f03a2bdcb5532136a87397f366f38bbce64673fc5e6a450" +checksum = "549c6d29a2e7a84e35c5dfbc06370a62c4d35f2328c31005267bec586b34f682" dependencies = [ + "async-stream", + "async-trait", + "bigdecimal", "chrono", - "clap", - "dotenvy", - "glob", - "regex", - "tracing", - "tracing-subscriber", - "url", -] - -[[package]] -name = "sea-orm-macros" + "derive-where", + "derive_more 2.1.1", + "futures-util", + "itertools 0.14.0", + "log", + "mac_address", + "ouroboros", + "pgvector", + "rust_decimal", + "sea-orm-arrow", + "sea-orm-macros 2.0.0", + "sea-query 1.0.1", + "sea-query-sqlx", + "sea-schema", + "serde", + "serde_json", + "sqlx 0.9.0", + "sqlx-core 0.9.0", + "strum 0.28.0", + "thiserror 2.0.19", + "time", + "tracing", + "url", + "uuid", + "web-time", +] + +[[package]] +name = "sea-orm-arrow" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2eee8405f16c1f337fe3a83389361caea83c928d14dbd666a480407072c365" +dependencies = [ + "arrow", + "sea-query 1.0.1", + "thiserror 2.0.19", +] + +[[package]] +name = "sea-orm-cli" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ec4b7c39c90efa92b8bb0b91ac7159684b9fa0d6371ce39bfab0a9793ce7394" +dependencies = [ + "chrono", + "clap", + "dotenvy", + "glob", + "indoc", + "regex", + "tracing", + "tracing-subscriber", + "url", +] + +[[package]] +name = "sea-orm-macros" version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b9a3f90e336ec74803e8eb98c61bc98754c1adfba3b4f84d946237b752b1c88" @@ -7884,20 +8233,36 @@ dependencies = [ "proc-macro2", "quote", "sea-bae", - "syn 2.0.118", + "syn 2.0.119", + "unicode-ident", +] + +[[package]] +name = "sea-orm-macros" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4cbb7ae053b9b37c919ea944a3bc52f7830a90c223f8a765c908293bca8f22d" +dependencies = [ + "heck 0.5.0", + "itertools 0.14.0", + "pluralizer", + "proc-macro2", + "quote", + "sea-bae", + "syn 2.0.119", "unicode-ident", ] [[package]] name = "sea-orm-migration" -version = "1.1.20" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c577f2959277e936c1d08109acd1e08fc36a95ef29ec028190ba82cad8f96e" +checksum = "ef3576c5301b67ea7d2ce4515858d700066e51911c7d228a439c00ff258695c8" dependencies = [ "async-trait", "clap", "dotenvy", - "sea-orm", + "sea-orm 2.0.0", "sea-orm-cli", "sea-schema", "tracing", @@ -7915,6 +8280,20 @@ dependencies = [ "inherent", "ordered-float", "rust_decimal", + "serde_json", + "time", + "uuid", +] + +[[package]] +name = "sea-query" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d190cfb3bcceb8a8d7d04dee5a0c77f60c7627979cdcb47fdcb8934f009badf" +dependencies = [ + "chrono", + "ordered-float", + "rust_decimal", "sea-query-derive", "serde_json", "time", @@ -7930,36 +8309,48 @@ dependencies = [ "bigdecimal", "chrono", "rust_decimal", - "sea-query", + "sea-query 0.32.7", "serde_json", - "sqlx", + "sqlx 0.8.6", "time", "uuid", ] [[package]] name = "sea-query-derive" -version = "0.4.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae0cbad6ab996955664982739354128c58d16e126114fe88c2a493642502aab" +checksum = "a0b0f466921cdd3cf4b89d5c3ac2173dba89a873ab395b123a645de181ec7537" dependencies = [ "darling 0.20.11", "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.118", - "thiserror 2.0.18", + "syn 2.0.119", + "thiserror 2.0.19", +] + +[[package]] +name = "sea-query-sqlx" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eaa419cdb9157da1361186b1959983eb2ea0dcb9a3c69dc45c449ecb2af8fef" +dependencies = [ + "sea-query 1.0.1", + "sqlx 0.9.0", ] [[package]] name = "sea-schema" -version = "0.16.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2239ff574c04858ca77485f112afea1a15e53135d3097d0c86509cef1def1338" +checksum = "3553c77dceed56e95bece9ea876c4dd67ca879ef51055a0b97a7bb89a8ae4fed" dependencies = [ - "futures", - "sea-query", + "async-trait", + "sea-query 1.0.1", + "sea-query-sqlx", "sea-schema-derive", + "sqlx 0.9.0", ] [[package]] @@ -7971,7 +8362,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -8036,7 +8427,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -8061,9 +8452,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -8093,29 +8484,29 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] name = "serde_json" -version = "1.0.150" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "indexmap 2.14.0", "itoa", @@ -8195,7 +8586,7 @@ dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -8278,7 +8669,7 @@ checksum = "94e153fc76e1c6a068703d6d29c508a0b15c061c4b7e43da59cc097bc342673c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -8362,6 +8753,17 @@ dependencies = [ "keccak 0.2.0", ] +[[package]] +name = "sha3" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9bad02c26382724b2d2692c6f179285e4b54eeecd7968f52a50059c3c11759" +dependencies = [ + "digest 0.11.3", + "keccak 0.2.0", + "sponge-cursor", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -8421,9 +8823,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" [[package]] name = "simd_cesu8" @@ -8505,23 +8907,23 @@ dependencies = [ [[package]] name = "snafu" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a012328be2e3f5d5f6f3218147ca02588cea4cb865e876849ab6debcf36522" +checksum = "e45cb604038abb7b926b679887b3226d8d0f23874b66623625a0454be425a4b7" dependencies = [ "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f103c50866b8743da9429b8a581d81a27c2d3a9c4ac7df8f8571c1dd7896eda" +checksum = "287f59010008f0d7cf5e3b03196d666c1acc46c8d3e9cf34c28a1a7157601e72" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -8579,17 +8981,36 @@ dependencies = [ "der 0.8.1", ] +[[package]] +name = "sponge-cursor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a0219bd7d979d58245a4f41f695e1ac9f8befdffadd7f61f1bae9e39abc6620" + [[package]] name = "sqlx" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" dependencies = [ - "sqlx-core", - "sqlx-macros", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", + "sqlx-core 0.8.6", + "sqlx-macros 0.8.6", + "sqlx-mysql 0.8.6", + "sqlx-postgres 0.8.6", + "sqlx-sqlite 0.8.6", +] + +[[package]] +name = "sqlx" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "378620ccc25c62c89d8be1c819e76a88d59bdcc3304733330788948e619bfd71" +dependencies = [ + "sqlx-core 0.9.0", + "sqlx-macros 0.9.0", + "sqlx-mysql 0.9.0", + "sqlx-postgres 0.9.0", + "sqlx-sqlite 0.9.0", ] [[package]] @@ -8618,19 +9039,55 @@ dependencies = [ "once_cell", "percent-encoding", "rust_decimal", + "serde", + "serde_json", + "sha2 0.10.9", + "smallvec", + "thiserror 2.0.19", + "time", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "sqlx-core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b44e85bf579a8eeb4ceaa77a3a523baf2bf0e9bac7e40f405d537b5d2d5ccb" +dependencies = [ + "base64", + "bytes", + "cfg-if", + "chrono", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.16.1", + "hashlink 0.11.1", + "indexmap 2.14.0", + "log", + "memchr", + "percent-encoding", + "rust_decimal", "rustls", "serde", "serde_json", "sha2 0.10.9", "smallvec", - "thiserror 2.0.18", + "thiserror 2.0.19", "time", "tokio", "tokio-stream", "tracing", "url", "uuid", - "webpki-roots 0.26.11", + "webpki-roots 1.0.9", ] [[package]] @@ -8641,9 +9098,22 @@ checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" dependencies = [ "proc-macro2", "quote", - "sqlx-core", - "sqlx-macros-core", - "syn 2.0.118", + "sqlx-core 0.8.6", + "sqlx-macros-core 0.8.6", + "syn 2.0.119", +] + +[[package]] +name = "sqlx-macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd2b84f2bc39a5705ef27ec785a11c934a41bbd4a24941e257927cddc26b60bf" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core 0.9.0", + "sqlx-macros-core 0.9.0", + "syn 2.0.119", ] [[package]] @@ -8662,11 +9132,35 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "sqlx-core", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", - "syn 2.0.118", + "sqlx-core 0.8.6", + "sqlx-mysql 0.8.6", + "sqlx-postgres 0.8.6", + "sqlx-sqlite 0.8.6", + "syn 2.0.119", + "url", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8d96de5fdc85a5c4ec813432b523ec637e80ba98f046555f75f7908ddac7c3" +dependencies = [ + "cfg-if", + "dotenvy", + "either", + "heck 0.5.0", + "hex", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.9", + "sqlx-core 0.9.0", + "sqlx-mysql 0.9.0", + "sqlx-postgres 0.9.0", + "sqlx-sqlite 0.9.0", + "syn 2.0.119", "tokio", "url", ] @@ -8680,7 +9174,7 @@ dependencies = [ "atoi", "base64", "bigdecimal", - "bitflags 2.13.0", + "bitflags 2.13.1", "byteorder", "bytes", "chrono", @@ -8709,13 +9203,43 @@ dependencies = [ "sha1 0.10.7", "sha2 0.10.9", "smallvec", - "sqlx-core", + "sqlx-core 0.8.6", "stringprep", - "thiserror 2.0.18", + "thiserror 2.0.19", + "time", + "tracing", + "uuid", + "whoami 1.6.1", +] + +[[package]] +name = "sqlx-mysql" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90b8020fe17c5f2c245bfa2505d7ef59c5604839527c740266ad2214acebea27" +dependencies = [ + "bitflags 2.13.1", + "byteorder", + "bytes", + "chrono", + "crc", + "digest 0.11.3", + "dotenvy", + "either", + "futures-core", + "futures-util", + "generic-array 0.14.7", + "log", + "percent-encoding", + "rust_decimal", + "serde", + "sha1 0.11.0", + "sha2 0.11.0", + "sqlx-core 0.9.0", + "thiserror 2.0.19", "time", "tracing", "uuid", - "whoami", ] [[package]] @@ -8727,12 +9251,12 @@ dependencies = [ "atoi", "base64", "bigdecimal", - "bitflags 2.13.0", + "bitflags 2.13.1", "byteorder", "chrono", "crc", "dotenvy", - "etcetera", + "etcetera 0.8.0", "futures-channel", "futures-core", "futures-util", @@ -8752,13 +9276,52 @@ dependencies = [ "serde_json", "sha2 0.10.9", "smallvec", - "sqlx-core", + "sqlx-core 0.8.6", "stringprep", - "thiserror 2.0.18", + "thiserror 2.0.19", "time", "tracing", "uuid", - "whoami", + "whoami 1.6.1", +] + +[[package]] +name = "sqlx-postgres" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87a2bdd6e83f6b3ea525ca9fee568030508b58355a43d0b2c1674d5f79dcd65e" +dependencies = [ + "atoi", + "base64", + "bitflags 2.13.1", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera 0.11.0", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf 0.13.0", + "hmac 0.13.0", + "itoa", + "log", + "md-5 0.11.0", + "memchr", + "rand 0.10.2", + "rust_decimal", + "serde", + "serde_json", + "sha2 0.11.0", + "smallvec", + "sqlx-core 0.9.0", + "stringprep", + "thiserror 2.0.19", + "time", + "tracing", + "uuid", + "whoami 2.1.2", ] [[package]] @@ -8769,7 +9332,7 @@ checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" dependencies = [ "atoi", "chrono", - "flume", + "flume 0.11.1", "futures-channel", "futures-core", "futures-executor", @@ -8780,8 +9343,35 @@ dependencies = [ "percent-encoding", "serde", "serde_urlencoded", - "sqlx-core", - "thiserror 2.0.18", + "sqlx-core 0.8.6", + "thiserror 2.0.19", + "time", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488e99c397a62007e4229aec669a179816339afc6d2620ca6fa420dbee2e982c" +dependencies = [ + "atoi", + "chrono", + "flume 0.12.0", + "form_urlencoded", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core 0.9.0", + "thiserror 2.0.19", "time", "tracing", "url", @@ -8807,21 +9397,19 @@ dependencies = [ [[package]] name = "ssh-cipher" -version = "0.3.0-rc.9" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10db6f219196a8528f9ec904d9d45cdad692d65b0e57e72be4dedd1c5fddce36" +checksum = "d801accda99469cde6d73da741422610fdf6508a72d9a69d1b55cb241c720597" dependencies = [ "aead 0.6.1", "aes 0.9.1", "aes-gcm 0.11.0", - "cbc 0.2.1", "chacha20 0.10.1", "cipher 0.5.2", - "ctr 0.10.1", "ctutils", "des 0.9.0", "poly1305 0.9.1", - "ssh-encoding 0.3.0-rc.9", + "ssh-encoding 0.3.0", "zeroize", ] @@ -8839,9 +9427,9 @@ dependencies = [ [[package]] name = "ssh-encoding" -version = "0.3.0-rc.9" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abf34aa716da5d5b4c496936d042ea282ab392092cd68a72ef6a8863ff8c96a" +checksum = "7b54d0ed0498daf3f78d82e00e28c8eec9d75a067c4cfbcc7a0f7d0f4077749e" dependencies = [ "base64ct", "bytes", @@ -8854,27 +9442,27 @@ dependencies = [ [[package]] name = "ssh-key" -version = "0.7.0-rc.10" +version = "0.7.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45735ce3dea95690e4a9e414c4cfde7f79835063c3dcd35881df85a84118e74b" +checksum = "f9a32fae177b74a22aa9c5b01bf7e68b33545be32d9e381e248058d2adc15ce3" dependencies = [ "argon2 0.6.0-rc.8", "bcrypt-pbkdf 0.11.0", "ctutils", - "ed25519-dalek 3.0.0-rc.0", + "ed25519-dalek 3.0.0", "hex", "hmac 0.13.0", - "p256 0.14.0-rc.10", - "p384 0.14.0-rc.10", - "p521 0.14.0-rc.10", + "p256 0.14.0", + "p384 0.14.0", + "p521 0.14.0", "rand_core 0.10.1", "rsa 0.10.0-rc.18", "sec1 0.8.1", "sha1 0.11.0", "sha2 0.11.0", "signature 3.0.0", - "ssh-cipher 0.3.0-rc.9", - "ssh-encoding 0.3.0-rc.9", + "ssh-cipher 0.3.0", + "ssh-encoding 0.3.0", "zeroize", ] @@ -8959,7 +9547,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.2.0", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -8971,7 +9559,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.3.0", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -8982,7 +9570,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -8993,7 +9581,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -9011,6 +9599,12 @@ version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" + [[package]] name = "strum_macros" version = "0.25.3" @@ -9021,7 +9615,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -9049,9 +9643,20 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -9075,7 +9680,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -9113,7 +9718,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -9230,11 +9835,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" dependencies = [ - "thiserror-impl 2.0.18", + "thiserror-impl 2.0.19", ] [[package]] @@ -9245,18 +9850,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] @@ -9279,9 +9884,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.53" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50" +checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244" dependencies = [ "deranged", "num-conv", @@ -9299,9 +9904,9 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" dependencies = [ "num-conv", "time-core", @@ -9359,14 +9964,14 @@ checksum = "2d2e76690929402faae40aebdda620a2c0e25dd6d3b9afe48867dfd95991f4bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] name = "tokio" -version = "1.52.3" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ "bytes", "libc", @@ -9391,13 +9996,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -9460,14 +10065,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" dependencies = [ "bytes", "futures-core", "futures-sink", "futures-util", + "libc", "pin-project-lite", "tokio", ] @@ -9514,9 +10120,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.2+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" +checksum = "53c96ecdfa941c8fc4fcaed14f99ada8ebed502eef533015095a07e3301d4c3c" dependencies = [ "indexmap 2.14.0", "serde_core", @@ -9570,9 +10176,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.12+spec-1.1.0" +version = "0.25.13+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" dependencies = [ "indexmap 2.14.0", "toml_datetime 1.1.1+spec-1.1.0", @@ -9597,9 +10203,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.1.1+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" [[package]] name = "tonic" @@ -9642,7 +10248,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -9686,7 +10292,7 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.13.1", "bytes", "futures-util", "http", @@ -9705,7 +10311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b11f75e912b0c2be01b63d8cf8057b8c3f97cf34abb3d431a3a4c8675498e233" dependencies = [ "async-compression", - "bitflags 2.13.0", + "bitflags 2.13.1", "bytes", "futures-core", "http", @@ -9765,7 +10371,7 @@ dependencies = [ "rand 0.9.5", "serde", "serde_json", - "thiserror 2.0.18", + "thiserror 2.0.19", "time", "tokio", "tracing", @@ -9803,7 +10409,7 @@ checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" dependencies = [ "crossbeam-channel", "symlink", - "thiserror 2.0.18", + "thiserror 2.0.19", "time", "tracing-subscriber", ] @@ -9816,7 +10422,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -9891,7 +10497,7 @@ checksum = "96cbd06a7b648f1603e60d75d9ed295d096b340d30e9f9324f4b512b5d40cd92" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -9923,7 +10529,7 @@ dependencies = [ "log", "rand 0.9.5", "sha1 0.10.7", - "thiserror 2.0.18", + "thiserror 2.0.19", ] [[package]] @@ -9940,7 +10546,7 @@ dependencies = [ "native-tls", "rand 0.10.2", "sha1 0.11.0", - "thiserror 2.0.18", + "thiserror 2.0.19", ] [[package]] @@ -10175,7 +10781,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -10205,9 +10811,9 @@ checksum = "e2eebbbfe4093922c2b6734d7c679ebfebd704a0d7e56dfcb0d05818ce28977d" [[package]] name = "uuid" -version = "1.23.5" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -10416,7 +11022,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", "wasm-bindgen-shared", ] @@ -10464,9 +11070,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" dependencies = [ "rustls-pki-types", ] @@ -10477,14 +11083,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.8", + "webpki-roots 1.0.9", ] [[package]] name = "webpki-roots" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" dependencies = [ "rustls-pki-types", ] @@ -10524,6 +11130,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "whoami" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "998767ef88740d1f5b0682a9c53c24431453923962269c2db68ee43788c5a40d" + [[package]] name = "winapi" version = "0.3.9" @@ -10654,7 +11266,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -10665,7 +11277,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -10946,6 +11558,17 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "wnaf" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab12e7090f27e2ffd9322651492942d50c2926094af30601e1964337db39daf1" +dependencies = [ + "ff 0.14.0", + "group 0.14.0", + "hybrid-array", +] + [[package]] name = "writeable" version = "0.6.3" @@ -10986,15 +11609,15 @@ dependencies = [ "nom 7.1.3", "oid-registry", "rusticata-macros", - "thiserror 2.0.18", + "thiserror 2.0.19", "time", ] [[package]] name = "xxhash-rust" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d93c89cdc2d3a63c3ec48ffe926931bdc069eafa8e4402fe6d8f790c9d1e576" +checksum = "aee1b19627c7c60102ab80d3a9cbe18de90bfe03bfa6c3715447681f0e8c8af6" [[package]] name = "yaml-rust2" @@ -11032,28 +11655,28 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.54" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19" +checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.54" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5" +checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -11073,7 +11696,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", "synstructure", ] @@ -11094,7 +11717,7 @@ checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -11127,7 +11750,7 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 57833c244..c8b2eef95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,18 +44,18 @@ libvault-core = "0.1.0" #==== anyhow = "1.0.103" serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.150" +serde_json = "1.0.151" serde_urlencoded = "0.7" tracing = "0.1.44" tracing-subscriber = "0.3.23" tracing-appender = "0.2.5" -thiserror = "2.0.18" -clap = "4.6.1" +thiserror = "2.0.19" +clap = "4.6.4" #==== -tokio = "1.52.3" +tokio = "1.53.1" tokio-stream = "0.1.18" -tokio-util = "0.7.18" +tokio-util = "0.7.19" async-trait = "0.1.89" async-stream = "0.3.6" async-recursion = "1.1.1" @@ -63,11 +63,11 @@ futures = "0.3.32" futures-util = "0.3.32" axum = { version = "0.8.9", features = ["macros", "json"] } axum-extra = "0.12.6" -russh = "0.61.2" +russh = "0.62.3" tower-http = "0.7.0" tower = "0.5.3" tower-sessions = { version = "0.15", features = ["memory-store"] } -time = { version = "0.3.51", features = ["serde"] } +time = { version = "0.3.54", features = ["serde"] } lettre = { version = "0.11", default-features = false, features = [ "builder", "smtp-transport", @@ -77,8 +77,8 @@ lettre = { version = "0.11", default-features = false, features = [ "rustls-platform-verifier", ] } #==== -sea-orm = "1.1.20" -sea-orm-migration = "1.1.20" +sea-orm = "2.0.0" +sea-orm-migration = "2.0.0" #==== rand = "0.10.2" @@ -94,10 +94,8 @@ hmac = "0.13" idgenerator = "2.0.0" config = "0.15.25" reqwest = "0.13.4" -lazy_static = "1.5.0" uuid = "1.23.5" regex = "1.13.0" -ed25519-dalek = "2.2.0" ctrlc = "3.5.2" cedar-policy = "4.11.2" secp256k1 = "0.31.1" diff --git a/ceres/src/model/admin.rs b/ceres/src/model/admin.rs index 781bc1d86..848a7d16a 100644 --- a/ceres/src/model/admin.rs +++ b/ceres/src/model/admin.rs @@ -1,4 +1,4 @@ -use serde::Serialize; +use serde::{Deserialize, Serialize}; use utoipa::ToSchema; #[derive(Serialize, ToSchema)] @@ -10,3 +10,15 @@ pub struct IsAdminResponse { pub struct AdminListResponse { pub admins: Vec, } + +/// Request body for generating `.mega_cedar.json` content from admin usernames. +#[derive(Debug, Deserialize, ToSchema)] +pub struct GenerateCedarRequest { + pub admins: Vec, +} + +/// Response containing generated `.mega_cedar.json` content. +#[derive(Serialize, ToSchema)] +pub struct GenerateCedarResponse { + pub content: String, +} diff --git a/ceres/src/model/webhook.rs b/ceres/src/model/webhook.rs index 128ff27d0..93cce3af5 100644 --- a/ceres/src/model/webhook.rs +++ b/ceres/src/model/webhook.rs @@ -7,7 +7,7 @@ use utoipa::ToSchema; pub struct CreateWebhookRequest { pub target_url: String, pub secret: String, - /// Event types: "cl.created", "cl.updated", "cl.merged", "cl.closed", "cl.reopened", "cl.comment.created", "*" + /// Event types: "cl_created", "cl_updated", "cl_merged", "cl_closed", "cl_reopened", "cl_comment_created", "all" pub event_types: Vec, pub path_filter: Option, pub active: Option, @@ -39,7 +39,7 @@ impl From for WebhookResponse { event_types: value .event_types .into_iter() - .map(|e| e.to_value()) + .map(|e| e.to_value().value.into_owned()) .collect(), path_filter: m.path_filter, active: m.active, @@ -52,7 +52,8 @@ impl From for WebhookResponse { pub fn parse_webhook_event_types(raw: Vec) -> Result, String> { raw.into_iter() .map(|s| { - WebhookEventTypeEnum::try_from_value(&s).map_err(|_| format!("invalid event type: {s}")) + WebhookEventTypeEnum::try_from(s.as_str()) + .map_err(|_| format!("invalid event type: {s}")) }) .collect() } @@ -66,7 +67,7 @@ mod tests { #[test] fn parse_webhook_event_types_accepts_known_values() { - let parsed = parse_webhook_event_types(vec!["cl.created".to_string(), "all".to_string()]) + let parsed = parse_webhook_event_types(vec!["cl_created".to_string(), "all".to_string()]) .expect("valid event types"); assert_eq!(parsed.len(), 2); assert_eq!(parsed[0], WebhookEventTypeEnum::ClCreated); @@ -75,7 +76,7 @@ mod tests { #[test] fn parse_webhook_event_types_rejects_unknown_values() { - let err = parse_webhook_event_types(vec!["not.a.real.event".to_string()]) + let err = parse_webhook_event_types(vec!["not_a_real_event".to_string()]) .expect_err("invalid event type"); assert!(err.contains("invalid event type")); } @@ -104,7 +105,7 @@ mod tests { let response = WebhookResponse::from(value); assert_eq!(response.id, 42); assert_eq!(response.target_url, "https://example.com/hook"); - assert_eq!(response.event_types, vec!["cl.created".to_string()]); + assert_eq!(response.event_types, vec!["cl_created".to_string()]); assert_eq!(response.path_filter.as_deref(), Some("/project")); assert!(response.active); } diff --git a/jupiter-migrate/README.md b/jupiter-migrate/README.md index f522ca2ae..e4367d83b 100644 --- a/jupiter-migrate/README.md +++ b/jupiter-migrate/README.md @@ -25,11 +25,30 @@ After schema changes, regenerate callisto entities (adjust connection URL for yo sea-orm-cli generate entity \ -u postgres://postgres:postgres@localhost:5432/mono \ -o jupiter/callisto/src \ - --with-serde both + --with-serde both \ + --entity-format dense ``` Review generated diffs in `jupiter/callisto/src/` before committing. +**Do not edit CLI-generated entity files** for polymorphic/link joins or `Model::new` helpers — those live only in `entity_ext/`. Regenerating must overwrite table models cleanly. + +**After every regen:** + +1. Re-add `pub mod entity_ext;` to `jupiter/callisto/src/mod.rs` (codegen overwrites this file). +2. Keep `sea_orm_active_enums.rs` webhook variant names readable (`ClCreated`, not CLI-mangled names). `rs_type = "Enum"` is correct for SeaORM 2.0 — call sites that need a string use `to_value().value` or `TryFrom<&str>`. +3. Leave `entity_ext/` alone — it owns: + - `Model::new` helpers and ID utilities + - Polymorphic / link-based `Relation` + `Related` (no DB FKs), including: + - `item_labels` / `item_assignees`: dual `belongs_to` on `item_id` → `mega_cl` and `mega_issue` + - `mega_cl` / `mega_issue`: `has_many` labels (via), assignees, conversations + - `mega_conversation`: link joins to CL/Issue; `has_many` reactions + - `reactions`: `belongs_to` conversation + - `mega_code_review_thread`: `belongs_to` `mega_cl` on `link` + - `label`: `has_many` `item_labels` + +Join call sites that need those relations use `callisto::entity_ext::::Relation`, not the generated entity `Relation`. + ## Library API ```rust diff --git a/jupiter-migrate/src/migration/m20250314_025943_init.rs b/jupiter-migrate/src/migration/m20250314_025943_init.rs index 676ecb6b6..4d42ac308 100644 --- a/jupiter-migrate/src/migration/m20250314_025943_init.rs +++ b/jupiter-migrate/src/migration/m20250314_025943_init.rs @@ -56,6 +56,7 @@ impl MigrationTrait for Migration { DatabaseBackend::Sqlite | DatabaseBackend::MySql => { // Do not create enum in sqlite } + _ => {} } manager diff --git a/jupiter-migrate/src/migration/m20250613_033821_alter_user_id.rs b/jupiter-migrate/src/migration/m20250613_033821_alter_user_id.rs index 090a1d00a..bca7eac42 100644 --- a/jupiter-migrate/src/migration/m20250613_033821_alter_user_id.rs +++ b/jupiter-migrate/src/migration/m20250613_033821_alter_user_id.rs @@ -54,6 +54,7 @@ impl MigrationTrait for Migration { } DatabaseBackend::Sqlite => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20250618_065050_add_label.rs b/jupiter-migrate/src/migration/m20250618_065050_add_label.rs index 48ebf403d..3c90e345e 100644 --- a/jupiter-migrate/src/migration/m20250618_065050_add_label.rs +++ b/jupiter-migrate/src/migration/m20250618_065050_add_label.rs @@ -20,6 +20,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } manager diff --git a/jupiter-migrate/src/migration/m20250702_072055_add_item_assignees.rs b/jupiter-migrate/src/migration/m20250702_072055_add_item_assignees.rs index ff68e5245..ce5481c6e 100644 --- a/jupiter-migrate/src/migration/m20250702_072055_add_item_assignees.rs +++ b/jupiter-migrate/src/migration/m20250702_072055_add_item_assignees.rs @@ -19,6 +19,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } manager diff --git a/jupiter-migrate/src/migration/m20250804_151214_alter_builds_end_at.rs b/jupiter-migrate/src/migration/m20250804_151214_alter_builds_end_at.rs index e0cf5e456..01db6d0d1 100644 --- a/jupiter-migrate/src/migration/m20250804_151214_alter_builds_end_at.rs +++ b/jupiter-migrate/src/migration/m20250804_151214_alter_builds_end_at.rs @@ -21,6 +21,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } Ok(()) @@ -43,6 +44,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20250812_022434_alter_mega_mr.rs b/jupiter-migrate/src/migration/m20250812_022434_alter_mega_mr.rs index a9c6fe5bc..ef4a0a5b1 100644 --- a/jupiter-migrate/src/migration/m20250812_022434_alter_mega_mr.rs +++ b/jupiter-migrate/src/migration/m20250812_022434_alter_mega_mr.rs @@ -27,7 +27,7 @@ impl MigrationTrait for Migration { manager .get_connection() - .execute(Statement::from_string( + .execute_raw(Statement::from_string( manager.get_database_backend(), "ALTER TABLE access_token RENAME COLUMN user_id TO username".to_owned(), )) @@ -35,13 +35,14 @@ impl MigrationTrait for Migration { manager .get_connection() - .execute(Statement::from_string( + .execute_raw(Statement::from_string( manager.get_database_backend(), "ALTER TABLE ssh_keys RENAME COLUMN user_id TO username".to_owned(), )) .await?; } DatabaseBackend::Sqlite => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20250819_025231_alter_builds.rs b/jupiter-migrate/src/migration/m20250819_025231_alter_builds.rs index d1542ab65..f95c7475d 100644 --- a/jupiter-migrate/src/migration/m20250819_025231_alter_builds.rs +++ b/jupiter-migrate/src/migration/m20250819_025231_alter_builds.rs @@ -24,6 +24,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::Sqlite => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20250821_083749_add_checks.rs b/jupiter-migrate/src/migration/m20250821_083749_add_checks.rs index 0716ea1c6..badeb1cd4 100644 --- a/jupiter-migrate/src/migration/m20250821_083749_add_checks.rs +++ b/jupiter-migrate/src/migration/m20250821_083749_add_checks.rs @@ -27,6 +27,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } manager diff --git a/jupiter-migrate/src/migration/m20250903_071928_add_issue_refs.rs b/jupiter-migrate/src/migration/m20250903_071928_add_issue_refs.rs index a70b7d232..f8ad4fc80 100644 --- a/jupiter-migrate/src/migration/m20250903_071928_add_issue_refs.rs +++ b/jupiter-migrate/src/migration/m20250903_071928_add_issue_refs.rs @@ -28,6 +28,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } manager diff --git a/jupiter-migrate/src/migration/m20250904_120000_add_commit_auths.rs b/jupiter-migrate/src/migration/m20250904_120000_add_commit_auths.rs index 1c8467eb4..3f4cf3a24 100644 --- a/jupiter-migrate/src/migration/m20250904_120000_add_commit_auths.rs +++ b/jupiter-migrate/src/migration/m20250904_120000_add_commit_auths.rs @@ -60,6 +60,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20251021_073817_rename_mr_sync_to_cl_sync.rs b/jupiter-migrate/src/migration/m20251021_073817_rename_mr_sync_to_cl_sync.rs index d10339e72..b4b8ec04a 100644 --- a/jupiter-migrate/src/migration/m20251021_073817_rename_mr_sync_to_cl_sync.rs +++ b/jupiter-migrate/src/migration/m20251021_073817_rename_mr_sync_to_cl_sync.rs @@ -14,7 +14,7 @@ impl MigrationTrait for Migration { manager.get_database_backend(), r#"ALTER TYPE "check_type_enum" RENAME VALUE 'mr_sync' TO 'cl_sync';"#, ); - manager.get_connection().execute(rename_stmt).await?; + manager.get_connection().execute_raw(rename_stmt).await?; } Ok(()) } @@ -25,7 +25,7 @@ impl MigrationTrait for Migration { manager.get_database_backend(), r#"ALTER TYPE "check_type_enum" RENAME VALUE 'cl_sync' TO 'mr_sync';"#, ); - manager.get_connection().execute(rollback_stmt).await?; + manager.get_connection().execute_raw(rollback_stmt).await?; } Ok(()) } diff --git a/jupiter-migrate/src/migration/m20251109_073000_add_merge_queue.rs b/jupiter-migrate/src/migration/m20251109_073000_add_merge_queue.rs index 91e882ce8..c30ea1ad0 100644 --- a/jupiter-migrate/src/migration/m20251109_073000_add_merge_queue.rs +++ b/jupiter-migrate/src/migration/m20251109_073000_add_merge_queue.rs @@ -32,6 +32,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } manager diff --git a/jupiter-migrate/src/migration/m20251119_145041_add_draft_status.rs b/jupiter-migrate/src/migration/m20251119_145041_add_draft_status.rs index 9bd7b6d0a..ff05759c7 100644 --- a/jupiter-migrate/src/migration/m20251119_145041_add_draft_status.rs +++ b/jupiter-migrate/src/migration/m20251119_145041_add_draft_status.rs @@ -1,31 +1,32 @@ -use sea_orm_migration::{prelude::*, sea_orm::DatabaseBackend}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - let backend = manager.get_database_backend(); - - match backend { - DatabaseBackend::Postgres => { - manager - .get_connection() - .execute_unprepared( - r#"ALTER TYPE merge_status_enum ADD VALUE IF NOT EXISTS 'draft';"#, - ) - .await?; - } - DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} - } - - Ok(()) - } - - async fn down(&self, _: &SchemaManager) -> Result<(), DbErr> { - // Note: PostgreSQL does not support removing enum values directly - // This migration cannot be fully reversed without recreating the enum - Ok(()) - } -} +use sea_orm_migration::{prelude::*, sea_orm::DatabaseBackend}; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + let backend = manager.get_database_backend(); + + match backend { + DatabaseBackend::Postgres => { + manager + .get_connection() + .execute_unprepared( + r#"ALTER TYPE merge_status_enum ADD VALUE IF NOT EXISTS 'draft';"#, + ) + .await?; + } + DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} + } + + Ok(()) + } + + async fn down(&self, _: &SchemaManager) -> Result<(), DbErr> { + // Note: PostgreSQL does not support removing enum values directly + // This migration cannot be fully reversed without recreating the enum + Ok(()) + } +} diff --git a/jupiter-migrate/src/migration/m20251125_135032_add_draft_conv_type.rs b/jupiter-migrate/src/migration/m20251125_135032_add_draft_conv_type.rs index c88ba6ace..bf028b74b 100644 --- a/jupiter-migrate/src/migration/m20251125_135032_add_draft_conv_type.rs +++ b/jupiter-migrate/src/migration/m20251125_135032_add_draft_conv_type.rs @@ -1,31 +1,32 @@ -use sea_orm_migration::{prelude::*, sea_orm::DatabaseBackend}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - let backend = manager.get_database_backend(); - - match backend { - DatabaseBackend::Postgres => { - manager - .get_connection() - .execute_unprepared( - r#"ALTER TYPE conv_type_enum ADD VALUE IF NOT EXISTS 'draft';"#, - ) - .await?; - } - DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} - } - - Ok(()) - } - - async fn down(&self, _: &SchemaManager) -> Result<(), DbErr> { - // Note: PostgreSQL does not support removing enum values directly - // This migration cannot be fully reversed without recreating the enum - Ok(()) - } -} +use sea_orm_migration::{prelude::*, sea_orm::DatabaseBackend}; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + let backend = manager.get_database_backend(); + + match backend { + DatabaseBackend::Postgres => { + manager + .get_connection() + .execute_unprepared( + r#"ALTER TYPE conv_type_enum ADD VALUE IF NOT EXISTS 'draft';"#, + ) + .await?; + } + DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} + } + + Ok(()) + } + + async fn down(&self, _: &SchemaManager) -> Result<(), DbErr> { + // Note: PostgreSQL does not support removing enum values directly + // This migration cannot be fully reversed without recreating the enum + Ok(()) + } +} diff --git a/jupiter-migrate/src/migration/m20251203_013745_add_dynamic_sidebar.rs b/jupiter-migrate/src/migration/m20251203_013745_add_dynamic_sidebar.rs index 6cca72595..d8ec42364 100644 --- a/jupiter-migrate/src/migration/m20251203_013745_add_dynamic_sidebar.rs +++ b/jupiter-migrate/src/migration/m20251203_013745_add_dynamic_sidebar.rs @@ -77,6 +77,7 @@ impl MigrationTrait for Migration { manager.get_connection().execute_unprepared(sql).await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20260108_105158_remove_storage_type_enum.rs b/jupiter-migrate/src/migration/m20260108_105158_remove_storage_type_enum.rs index 0002ee5a4..69818bc8b 100644 --- a/jupiter-migrate/src/migration/m20260108_105158_remove_storage_type_enum.rs +++ b/jupiter-migrate/src/migration/m20260108_105158_remove_storage_type_enum.rs @@ -15,13 +15,14 @@ impl MigrationTrait for Migration { DatabaseBackend::Postgres => { manager .get_connection() - .execute(Statement::from_string( + .execute_raw(Statement::from_string( DatabaseBackend::Postgres, "DROP TYPE IF EXISTS storage_type_enum;".to_owned(), )) .await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } Ok(()) @@ -34,7 +35,7 @@ impl MigrationTrait for Migration { DatabaseBackend::Postgres => { manager .get_connection() - .execute(Statement::from_string( + .execute_raw(Statement::from_string( DatabaseBackend::Postgres, r#" CREATE TYPE storage_type_enum AS ENUM ( @@ -48,6 +49,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20260115_000000_create_targets_table.rs b/jupiter-migrate/src/migration/m20260115_000000_create_targets_table.rs index 5a489428e..beb26cafd 100644 --- a/jupiter-migrate/src/migration/m20260115_000000_create_targets_table.rs +++ b/jupiter-migrate/src/migration/m20260115_000000_create_targets_table.rs @@ -161,7 +161,7 @@ impl MigrationTrait for Migration { "# .to_string(), ); - manager.get_connection().execute(backfill_stmt).await?; + manager.get_connection().execute_raw(backfill_stmt).await?; } manager diff --git a/jupiter-migrate/src/migration/m20260119_060233_add_mega_code_review.rs b/jupiter-migrate/src/migration/m20260119_060233_add_mega_code_review.rs index 9db96ceaf..6cc426ee2 100644 --- a/jupiter-migrate/src/migration/m20260119_060233_add_mega_code_review.rs +++ b/jupiter-migrate/src/migration/m20260119_060233_add_mega_code_review.rs @@ -32,6 +32,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } // Create code review thread table diff --git a/jupiter-migrate/src/migration/m20260128_080549_add_mega_code_review_anchor_and_position.rs b/jupiter-migrate/src/migration/m20260128_080549_add_mega_code_review_anchor_and_position.rs index ac41f62a2..b98221132 100644 --- a/jupiter-migrate/src/migration/m20260128_080549_add_mega_code_review_anchor_and_position.rs +++ b/jupiter-migrate/src/migration/m20260128_080549_add_mega_code_review_anchor_and_position.rs @@ -23,6 +23,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } // Remove code review thread table `DiffSide`, `LineNumber` and `FilePath` diff --git a/jupiter-migrate/src/migration/m20260209_064016_remove_default_dynamic_sidebar.rs b/jupiter-migrate/src/migration/m20260209_064016_remove_default_dynamic_sidebar.rs index 1c8d5c0a0..9bc101718 100644 --- a/jupiter-migrate/src/migration/m20260209_064016_remove_default_dynamic_sidebar.rs +++ b/jupiter-migrate/src/migration/m20260209_064016_remove_default_dynamic_sidebar.rs @@ -40,6 +40,7 @@ impl MigrationTrait for Migration { manager.get_connection().execute_unprepared(sql).await?; } DatabaseBackend::Sqlite | DatabaseBackend::MySql => {} + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20260211_102158_add_username_to_mega_cl_sqlite.rs b/jupiter-migrate/src/migration/m20260211_102158_add_username_to_mega_cl_sqlite.rs index 23558589c..885606a19 100644 --- a/jupiter-migrate/src/migration/m20260211_102158_add_username_to_mega_cl_sqlite.rs +++ b/jupiter-migrate/src/migration/m20260211_102158_add_username_to_mega_cl_sqlite.rs @@ -33,6 +33,7 @@ impl MigrationTrait for Migration { // Already handled by m20250812_022434_alter_mega_mr // No action needed } + _ => {} } Ok(()) diff --git a/jupiter-migrate/src/migration/m20260216_013852_create_group_permission_tables.rs b/jupiter-migrate/src/migration/m20260216_013852_create_group_permission_tables.rs index eace19501..02340ba90 100644 --- a/jupiter-migrate/src/migration/m20260216_013852_create_group_permission_tables.rs +++ b/jupiter-migrate/src/migration/m20260216_013852_create_group_permission_tables.rs @@ -32,6 +32,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } manager diff --git a/jupiter-migrate/src/migration/m20260224_142019_create_target_build_status.rs b/jupiter-migrate/src/migration/m20260224_142019_create_target_build_status.rs index d71f7938a..014406e36 100644 --- a/jupiter-migrate/src/migration/m20260224_142019_create_target_build_status.rs +++ b/jupiter-migrate/src/migration/m20260224_142019_create_target_build_status.rs @@ -21,6 +21,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } // Create target build status table diff --git a/jupiter-migrate/src/migration/m20260302_082846_add_cla_sign_status.rs b/jupiter-migrate/src/migration/m20260302_082846_add_cla_sign_status.rs index e526c1b9e..c63cd4a8c 100644 --- a/jupiter-migrate/src/migration/m20260302_082846_add_cla_sign_status.rs +++ b/jupiter-migrate/src/migration/m20260302_082846_add_cla_sign_status.rs @@ -41,7 +41,7 @@ impl MigrationTrait for Migration { ); manager .get_connection() - .execute(add_check_type_stmt) + .execute_raw(add_check_type_stmt) .await?; // Ensure the new enum value 'cla_sign' is added before inserting the config manager diff --git a/jupiter-migrate/src/migration/m20260304_013434_seed_cla_sign_check_config.rs b/jupiter-migrate/src/migration/m20260304_013434_seed_cla_sign_check_config.rs index 44365957d..15c560a45 100644 --- a/jupiter-migrate/src/migration/m20260304_013434_seed_cla_sign_check_config.rs +++ b/jupiter-migrate/src/migration/m20260304_013434_seed_cla_sign_check_config.rs @@ -9,7 +9,7 @@ impl MigrationTrait for Migration { let db_backend = manager.get_database_backend(); manager .get_connection() - .execute(Statement::from_string( + .execute_raw(Statement::from_string( db_backend, r#" INSERT INTO path_check_configs (created_at, updated_at, id, path, check_type_code, enabled, required) @@ -29,7 +29,7 @@ impl MigrationTrait for Migration { let db_backend = manager.get_database_backend(); manager .get_connection() - .execute(Statement::from_string( + .execute_raw(Statement::from_string( db_backend, r#"DELETE FROM path_check_configs WHERE path = '/' AND check_type_code = 'cla_sign';"#, )) diff --git a/jupiter-migrate/src/migration/m20260306_121829_create_bots_related_table.rs b/jupiter-migrate/src/migration/m20260306_121829_create_bots_related_table.rs index 0a83f1b31..f6e7fff57 100644 --- a/jupiter-migrate/src/migration/m20260306_121829_create_bots_related_table.rs +++ b/jupiter-migrate/src/migration/m20260306_121829_create_bots_related_table.rs @@ -75,6 +75,7 @@ impl MigrationTrait for Migration { .await?; } DatabaseBackend::MySql | DatabaseBackend::Sqlite => {} + _ => {} } // === Bots table === diff --git a/jupiter-migrate/src/migration/m20260720_060000_rename_webhook_event_type_underscores.rs b/jupiter-migrate/src/migration/m20260720_060000_rename_webhook_event_type_underscores.rs new file mode 100644 index 000000000..89b95bca3 --- /dev/null +++ b/jupiter-migrate/src/migration/m20260720_060000_rename_webhook_event_type_underscores.rs @@ -0,0 +1,101 @@ +use sea_orm::{ConnectionTrait, DatabaseBackend, Statement}; +use sea_orm_migration::prelude::*; + +#[derive(DeriveMigrationName)] +pub struct Migration; + +const RENAMES: &[(&str, &str)] = &[ + ("cl.created", "cl_created"), + ("cl.updated", "cl_updated"), + ("cl.merged", "cl_merged"), + ("cl.closed", "cl_closed"), + ("cl.reopened", "cl_reopened"), + ("cl.comment.created", "cl_comment_created"), +]; + +#[async_trait::async_trait] +impl MigrationTrait for Migration { + async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { + let conn = manager.get_connection(); + + match manager.get_database_backend() { + DatabaseBackend::Postgres => { + // Idempotent: only rename labels that still use the dotted form + // (fresh installs already create underscore labels in m20260324). + for (from, to) in RENAMES { + conn.execute_raw(Statement::from_string( + DatabaseBackend::Postgres, + format!( + r#"DO $$ BEGIN + IF EXISTS ( + SELECT 1 + FROM pg_enum e + JOIN pg_type t ON e.enumtypid = t.oid + WHERE t.typname = 'webhook_event_type_enum' + AND e.enumlabel = '{from}' + ) THEN + ALTER TYPE webhook_event_type_enum RENAME VALUE '{from}' TO '{to}'; + END IF; +END $$;"# + ), + )) + .await?; + } + } + DatabaseBackend::Sqlite => { + for (from, to) in RENAMES { + for table in ["mega_webhook_event_type", "mega_webhook_delivery"] { + conn.execute_unprepared(&format!( + "UPDATE {table} SET event_type = '{to}' WHERE event_type = '{from}'" + )) + .await?; + } + } + } + _ => {} + } + + Ok(()) + } + + async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { + let conn = manager.get_connection(); + + match manager.get_database_backend() { + DatabaseBackend::Postgres => { + for (from, to) in RENAMES { + conn.execute_raw(Statement::from_string( + DatabaseBackend::Postgres, + format!( + r#"DO $$ BEGIN + IF EXISTS ( + SELECT 1 + FROM pg_enum e + JOIN pg_type t ON e.enumtypid = t.oid + WHERE t.typname = 'webhook_event_type_enum' + AND e.enumlabel = '{to}' + ) THEN + ALTER TYPE webhook_event_type_enum RENAME VALUE '{to}' TO '{from}'; + END IF; +END $$;"# + ), + )) + .await?; + } + } + DatabaseBackend::Sqlite => { + for (from, to) in RENAMES { + for table in ["mega_webhook_event_type", "mega_webhook_delivery"] { + conn.execute_unprepared(&format!( + "UPDATE {table} SET event_type = '{from}' WHERE event_type = '{to}'" + )) + .await?; + } + } + } + _ => {} + } + + Ok(()) + } +} diff --git a/jupiter-migrate/src/migration/mod.rs b/jupiter-migrate/src/migration/mod.rs index 2a3170d8e..3dd5a5fd3 100644 --- a/jupiter-migrate/src/migration/mod.rs +++ b/jupiter-migrate/src/migration/mod.rs @@ -99,6 +99,7 @@ mod m20260327_034553_drop_legacy_tasks; mod m20260413_033315_create_artifact_tables; mod m20260612_011232_drop_build_events_log; mod m20260714_021900_create_user_approval_status; +mod m20260720_060000_rename_webhook_event_type_underscores; mod runner; pub use runner::apply_migrations; @@ -185,6 +186,7 @@ impl MigratorTrait for Migrator { Box::new(m20260413_033315_create_artifact_tables::Migration), Box::new(m20260612_011232_drop_build_events_log::Migration), Box::new(m20260714_021900_create_user_approval_status::Migration), + Box::new(m20260720_060000_rename_webhook_event_type_underscores::Migration), ] } } diff --git a/jupiter-migrate/src/migration/runner.rs b/jupiter-migrate/src/migration/runner.rs index 60611292e..762b0125c 100644 --- a/jupiter-migrate/src/migration/runner.rs +++ b/jupiter-migrate/src/migration/runner.rs @@ -62,7 +62,7 @@ mod tests { .await .expect("migrations should apply"); - db.execute(Statement::from_string( + db.execute_raw(Statement::from_string( DbBackend::Sqlite, "PRAGMA foreign_keys = ON;", )) @@ -82,7 +82,7 @@ mod tests { table ), ); - let row = db.query_one(stmt).await.expect("query sqlite_master"); + let row = db.query_one_raw(stmt).await.expect("query sqlite_master"); assert!(row.is_some(), "expected table '{table}' to exist"); } diff --git a/jupiter/callisto/src/access_token.rs b/jupiter/callisto/src/access_token.rs index 3bc44b213..ae2741af5 100644 --- a/jupiter/callisto/src/access_token.rs +++ b/jupiter/callisto/src/access_token.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "access_token")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -14,7 +15,4 @@ pub struct Model { pub created_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/artifact_objects.rs b/jupiter/callisto/src/artifact_objects.rs index edd330536..98a11c836 100644 --- a/jupiter/callisto/src/artifact_objects.rs +++ b/jupiter/callisto/src/artifact_objects.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "artifact_objects")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -16,31 +17,8 @@ pub struct Model { pub created_at: DateTime, pub last_seen_at: DateTime, pub integrity: Option, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::artifact_set_files::Entity")] - ArtifactSetFiles, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::ArtifactSetFiles.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - super::artifact_set_files::Relation::ArtifactSets.def() - } - fn via() -> Option { - Some( - super::artifact_set_files::Relation::ArtifactObjects - .def() - .rev(), - ) - } + #[sea_orm(has_many, via = "artifact_set_files")] + pub artifact_sets: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/artifact_set_files.rs b/jupiter/callisto/src/artifact_set_files.rs index 105bf25f9..f63688bca 100644 --- a/jupiter/callisto/src/artifact_set_files.rs +++ b/jupiter/callisto/src/artifact_set_files.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "artifact_set_files")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -14,38 +15,22 @@ pub struct Model { pub size_bytes: i64, #[sea_orm(column_type = "Text", nullable)] pub content_type: Option, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::artifact_objects::Entity", - from = "Column::Oid", - to = "super::artifact_objects::Column::Oid", + belongs_to, + from = "oid", + to = "oid", on_update = "Restrict", on_delete = "Restrict" )] - ArtifactObjects, + pub artifact_objects: BelongsTo, #[sea_orm( - belongs_to = "super::artifact_sets::Entity", - from = "Column::SetId", - to = "super::artifact_sets::Column::Id", + belongs_to, + from = "set_id", + to = "id", on_update = "NoAction", on_delete = "Cascade" )] - ArtifactSets, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::ArtifactObjects.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::ArtifactSets.def() - } + pub artifact_sets: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/artifact_sets.rs b/jupiter/callisto/src/artifact_sets.rs index 345a08dbc..6e81bd764 100644 --- a/jupiter/callisto/src/artifact_sets.rs +++ b/jupiter/callisto/src/artifact_sets.rs @@ -1,46 +1,28 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "artifact_sets")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "ux_artifact_sets_repo_namespace_type_set_id")] pub repo: String, + #[sea_orm(unique_key = "ux_artifact_sets_repo_namespace_type_set_id")] pub namespace: String, + #[sea_orm(unique_key = "ux_artifact_sets_repo_namespace_type_set_id")] pub object_type: String, + #[sea_orm(unique_key = "ux_artifact_sets_repo_namespace_type_set_id")] pub artifact_set_id: String, pub metadata: Option, pub created_by: Option, pub created_at: DateTime, pub expires_at: Option, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::artifact_set_files::Entity")] - ArtifactSetFiles, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::ArtifactSetFiles.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - super::artifact_set_files::Relation::ArtifactObjects.def() - } - fn via() -> Option { - Some( - super::artifact_set_files::Relation::ArtifactSets - .def() - .rev(), - ) - } + #[sea_orm(has_many, via = "artifact_set_files")] + pub artifact_objects: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/audit_logs.rs b/jupiter/callisto/src/audit_logs.rs index 4fed92f56..b5faf7556 100644 --- a/jupiter/callisto/src/audit_logs.rs +++ b/jupiter/callisto/src/audit_logs.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::{ActorTypeEnum, AuditActionEnum, TargetTypeEnum}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "audit_logs")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -19,7 +20,4 @@ pub struct Model { pub created_at: DateTimeWithTimeZone, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/bot_installations.rs b/jupiter/callisto/src/bot_installations.rs index cc41dbe28..924387e23 100644 --- a/jupiter/callisto/src/bot_installations.rs +++ b/jupiter/callisto/src/bot_installations.rs @@ -1,39 +1,33 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::{InstallationBotStatusEnum, InstallationTargetTypeEnum}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "bot_installations")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uq_bot_installations_target")] pub bot_id: i64, + #[sea_orm(unique_key = "uq_bot_installations_target")] pub target_type: InstallationTargetTypeEnum, + #[sea_orm(unique_key = "uq_bot_installations_target")] pub target_id: i64, pub status: InstallationBotStatusEnum, pub installed_by: i64, pub installed_at: DateTimeWithTimeZone, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::bots::Entity", - from = "Column::BotId", - to = "super::bots::Column::Id", + belongs_to, + from = "bot_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - Bots, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::Bots.def() - } + pub bots: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/bot_keys.rs b/jupiter/callisto/src/bot_keys.rs index 98cdc4f9b..deb47275e 100644 --- a/jupiter/callisto/src/bot_keys.rs +++ b/jupiter/callisto/src/bot_keys.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "bot_keys")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -12,24 +13,14 @@ pub struct Model { pub private_key: String, pub public_key: String, pub created_at: DateTimeWithTimeZone, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::bots::Entity", - from = "Column::BotId", - to = "super::bots::Column::Id", + belongs_to, + from = "bot_id", + to = "id", on_update = "NoAction", on_delete = "Cascade" )] - Bots, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::Bots.def() - } + pub bots: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/bot_tokens.rs b/jupiter/callisto/src/bot_tokens.rs index b2a9768d2..af6c47c22 100644 --- a/jupiter/callisto/src/bot_tokens.rs +++ b/jupiter/callisto/src/bot_tokens.rs @@ -1,37 +1,31 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "bot_tokens")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uq_bot_tokens_name_hash")] pub bot_id: i64, + #[sea_orm(unique_key = "uq_bot_tokens_name_hash")] pub token_hash: String, + #[sea_orm(unique_key = "uq_bot_tokens_name_hash")] pub token_name: String, pub expires_at: Option, pub created_at: DateTimeWithTimeZone, pub revoked: bool, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::bots::Entity", - from = "Column::BotId", - to = "super::bots::Column::Id", + belongs_to, + from = "bot_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - Bots, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::Bots.def() - } + pub bots: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/bots.rs b/jupiter/callisto/src/bots.rs index 418f46f8f..a302eb888 100644 --- a/jupiter/callisto/src/bots.rs +++ b/jupiter/callisto/src/bots.rs @@ -1,50 +1,31 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::{BotStatusEnum, PermissionScopeEnum}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "bots")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uq_bots_name_org")] pub name: String, + #[sea_orm(unique_key = "uq_bots_name_org")] pub organization_id: Option, pub creator_user_id: i64, pub permission_scope: PermissionScopeEnum, pub status: BotStatusEnum, pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::bot_installations::Entity")] - BotInstallations, - #[sea_orm(has_many = "super::bot_keys::Entity")] - BotKeys, - #[sea_orm(has_many = "super::bot_tokens::Entity")] - BotTokens, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BotInstallations.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BotKeys.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BotTokens.def() - } + #[sea_orm(has_many)] + pub bot_installations: HasMany, + #[sea_orm(has_many)] + pub bot_keys: HasMany, + #[sea_orm(has_many)] + pub bot_tokens: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/buck_session.rs b/jupiter/callisto/src/buck_session.rs index bec64facf..57d97617e 100644 --- a/jupiter/callisto/src/buck_session.rs +++ b/jupiter/callisto/src/buck_session.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "buck_session")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -20,18 +21,8 @@ pub struct Model { pub expires_at: DateTime, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::buck_session_file::Entity")] - BuckSessionFile, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BuckSessionFile.def() - } + #[sea_orm(has_many)] + pub buck_session_files: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/buck_session_file.rs b/jupiter/callisto/src/buck_session_file.rs index 158d68f56..750a4302f 100644 --- a/jupiter/callisto/src/buck_session_file.rs +++ b/jupiter/callisto/src/buck_session_file.rs @@ -1,15 +1,17 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "buck_session_file")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uk_session_file")] pub session_id: String, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uk_session_file")] pub file_path: String, pub file_size: i64, pub file_hash: String, @@ -19,24 +21,14 @@ pub struct Model { pub blob_id: Option, pub uploaded_at: Option, pub created_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::buck_session::Entity", - from = "Column::SessionId", - to = "super::buck_session::Column::SessionId", + belongs_to, + from = "session_id", + to = "session_id", on_update = "NoAction", on_delete = "Cascade" )] - BuckSession, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BuckSession.def() - } + pub buck_session: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/build_events.rs b/jupiter/callisto/src/build_events.rs index 642b81f91..c83823627 100644 --- a/jupiter/callisto/src/build_events.rs +++ b/jupiter/callisto/src/build_events.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "build_events")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -14,32 +15,16 @@ pub struct Model { pub log_output_file: String, pub start_at: DateTimeWithTimeZone, pub end_at: Option, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::orion_tasks::Entity", - from = "Column::TaskId", - to = "super::orion_tasks::Column::Id", + belongs_to, + from = "task_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - OrionTasks, - #[sea_orm(has_many = "super::target_state_histories::Entity")] - TargetStateHistories, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::OrionTasks.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::TargetStateHistories.def() - } + pub orion_tasks: BelongsTo, + #[sea_orm(has_many)] + pub target_state_histories: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/build_targets.rs b/jupiter/callisto/src/build_targets.rs index 834046d07..2fbf8921d 100644 --- a/jupiter/callisto/src/build_targets.rs +++ b/jupiter/callisto/src/build_targets.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "build_targets")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -12,32 +13,16 @@ pub struct Model { pub path: String, #[sea_orm(column_type = "Text")] pub latest_state: String, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::orion_tasks::Entity", - from = "Column::TaskId", - to = "super::orion_tasks::Column::Id", + belongs_to, + from = "task_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - OrionTasks, - #[sea_orm(has_many = "super::target_state_histories::Entity")] - TargetStateHistories, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::OrionTasks.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::TargetStateHistories.def() - } + pub orion_tasks: BelongsTo, + #[sea_orm(has_many)] + pub target_state_histories: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/build_triggers.rs b/jupiter/callisto/src/build_triggers.rs index bfb1c26e3..facb820b7 100644 --- a/jupiter/callisto/src/build_triggers.rs +++ b/jupiter/callisto/src/build_triggers.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "build_triggers")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -17,7 +18,4 @@ pub struct Model { pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/check_result.rs b/jupiter/callisto/src/check_result.rs index ec6181679..35d0923a2 100644 --- a/jupiter/callisto/src/check_result.rs +++ b/jupiter/callisto/src/check_result.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::CheckTypeEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "check_result")] pub struct Model { pub created_at: DateTime, @@ -13,14 +14,13 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, pub path: String, + #[sea_orm(unique_key = "check_res_unique")] pub cl_link: String, pub commit_id: String, + #[sea_orm(unique_key = "check_res_unique")] pub check_type_code: CheckTypeEnum, pub status: String, pub message: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/cla_sign_status.rs b/jupiter/callisto/src/cla_sign_status.rs index 20a27fc33..2603d4354 100644 --- a/jupiter/callisto/src/cla_sign_status.rs +++ b/jupiter/callisto/src/cla_sign_status.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "cla_sign_status")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -14,7 +15,4 @@ pub struct Model { pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/commit_auths.rs b/jupiter/callisto/src/commit_auths.rs index be9bc7241..e5d30a3a8 100644 --- a/jupiter/callisto/src/commit_auths.rs +++ b/jupiter/callisto/src/commit_auths.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "commit_auths")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -15,7 +16,4 @@ pub struct Model { pub created_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/dynamic_sidebar.rs b/jupiter/callisto/src/dynamic_sidebar.rs index f2dd1d81b..4b2ca2a3d 100644 --- a/jupiter/callisto/src/dynamic_sidebar.rs +++ b/jupiter/callisto/src/dynamic_sidebar.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "dynamic_sidebar")] pub struct Model { #[sea_orm(primary_key)] @@ -16,7 +17,4 @@ pub struct Model { pub order_index: i32, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/email_jobs.rs b/jupiter/callisto/src/email_jobs.rs index fdeec0fa5..5dbeae486 100644 --- a/jupiter/callisto/src/email_jobs.rs +++ b/jupiter/callisto/src/email_jobs.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "email_jobs")] pub struct Model { #[sea_orm(primary_key)] @@ -25,24 +26,14 @@ pub struct Model { pub sent_at: Option, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::notification_event_types::Entity", - from = "Column::EventTypeCode", - to = "super::notification_event_types::Column::Code", + belongs_to, + from = "event_type_code", + to = "code", on_update = "Cascade", on_delete = "Restrict" )] - NotificationEventTypes, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::NotificationEventTypes.def() - } + pub notification_event_types: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/entity_ext/item_assignees.rs b/jupiter/callisto/src/entity_ext/item_assignees.rs index b71f51964..c88c02d92 100644 --- a/jupiter/callisto/src/entity_ext/item_assignees.rs +++ b/jupiter/callisto/src/entity_ext/item_assignees.rs @@ -5,7 +5,7 @@ use crate::item_assignees::{Column, Entity}; #[derive(Copy, Clone, Debug, EnumIter)] pub enum Relation { MegaIssue, - MegaMr, + MegaCl, } impl RelationTrait for Relation { @@ -15,7 +15,7 @@ impl RelationTrait for Relation { .from(Column::ItemId) .to(crate::mega_issue::Column::Id) .into(), - Self::MegaMr => Entity::belongs_to(crate::mega_cl::Entity) + Self::MegaCl => Entity::belongs_to(crate::mega_cl::Entity) .from(Column::ItemId) .to(crate::mega_cl::Column::Id) .into(), @@ -31,6 +31,6 @@ impl Related for Entity { impl Related for Entity { fn to() -> RelationDef { - Relation::MegaMr.def() + Relation::MegaCl.def() } } diff --git a/jupiter/callisto/src/entity_ext/mega_cl.rs b/jupiter/callisto/src/entity_ext/mega_cl.rs index 934439301..95be1656b 100644 --- a/jupiter/callisto/src/entity_ext/mega_cl.rs +++ b/jupiter/callisto/src/entity_ext/mega_cl.rs @@ -52,14 +52,14 @@ impl Related for Entity { } impl mega_cl::Model { - pub fn new( - path: String, - title: String, - link: String, - base_branch: String, - from_hash: String, - to_hash: String, - username: String, + pub fn new( + path: String, + title: String, + link: String, + base_branch: String, + from_hash: String, + to_hash: String, + username: String, ) -> Self { let now = chrono::Utc::now().naive_utc(); Self { @@ -69,23 +69,23 @@ impl mega_cl::Model { status: MergeStatusEnum::Open, created_at: now, updated_at: now, - merge_date: None, - path, - base_branch, - from_hash, - to_hash, - username, + merge_date: None, + path, + base_branch, + from_hash, + to_hash, + username, } } /// Create a new CL with Draft status - pub fn new_draft( - path: String, - title: String, - link: String, - base_branch: String, - from_hash: String, - username: String, + pub fn new_draft( + path: String, + title: String, + link: String, + base_branch: String, + from_hash: String, + username: String, ) -> Self { let now = chrono::Utc::now().naive_utc(); Self { @@ -95,12 +95,12 @@ impl mega_cl::Model { status: MergeStatusEnum::Draft, created_at: now, updated_at: now, - merge_date: None, - path, - base_branch, - from_hash, - to_hash: String::new(), - username, + merge_date: None, + path, + base_branch, + from_hash, + to_hash: String::new(), + username, } } } diff --git a/jupiter/callisto/src/entity_ext/mega_code_review_anchor.rs b/jupiter/callisto/src/entity_ext/mega_code_review_anchor.rs index 321835468..8fbe5b600 100644 --- a/jupiter/callisto/src/entity_ext/mega_code_review_anchor.rs +++ b/jupiter/callisto/src/entity_ext/mega_code_review_anchor.rs @@ -1,33 +1,9 @@ -use sea_orm::entity::prelude::*; - use crate::{ entity_ext::{generate_hash_content, generate_id, normalize}, - mega_code_review_anchor::{self, Column, Entity}, + mega_code_review_anchor, sea_orm_active_enums::DiffSideEnum, }; -#[derive(Copy, Clone, Debug, EnumIter)] -pub enum Relation { - Thread, - Position, -} - -impl RelationTrait for Relation { - fn def(&self) -> sea_orm::RelationDef { - match self { - Self::Thread => Entity::belongs_to(crate::mega_code_review_thread::Entity) - .from(Column::ThreadId) - .to(crate::mega_code_review_thread::Column::Id) - .into(), - - Self::Position => Entity::has_one(crate::mega_code_review_position::Entity) - .from(Column::Id) - .to(crate::mega_code_review_position::Column::AnchorId) - .into(), - } - } -} - impl mega_code_review_anchor::Model { #[allow(clippy::too_many_arguments)] pub fn new( diff --git a/jupiter/callisto/src/entity_ext/mega_code_review_comment.rs b/jupiter/callisto/src/entity_ext/mega_code_review_comment.rs index 3274387be..5c40056b7 100644 --- a/jupiter/callisto/src/entity_ext/mega_code_review_comment.rs +++ b/jupiter/callisto/src/entity_ext/mega_code_review_comment.rs @@ -1,25 +1,4 @@ -use sea_orm::entity::prelude::*; - -use crate::{ - entity_ext::generate_id, - mega_code_review_comment::{self, Column, Entity}, -}; - -#[derive(Copy, Clone, Debug, EnumIter)] -pub enum Relation { - Thread, -} - -impl RelationTrait for Relation { - fn def(&self) -> sea_orm::RelationDef { - match self { - Self::Thread => Entity::belongs_to(crate::mega_code_review_thread::Entity) - .from(Column::ThreadId) - .to(crate::mega_code_review_thread::Column::Id) - .into(), - } - } -} +use crate::{entity_ext::generate_id, mega_code_review_comment}; impl mega_code_review_comment::Model { pub fn new( diff --git a/jupiter/callisto/src/entity_ext/mega_code_review_position.rs b/jupiter/callisto/src/entity_ext/mega_code_review_position.rs index 365a99739..62e62c843 100644 --- a/jupiter/callisto/src/entity_ext/mega_code_review_position.rs +++ b/jupiter/callisto/src/entity_ext/mega_code_review_position.rs @@ -1,27 +1,9 @@ -use sea_orm::entity::prelude::*; - use crate::{ entity_ext::generate_id, - mega_code_review_position::{self, Column, Entity}, + mega_code_review_position, sea_orm_active_enums::{DiffSideEnum, PositionStatusEnum}, }; -#[derive(Copy, Clone, Debug, EnumIter)] -pub enum Relation { - Anchor, -} - -impl RelationTrait for Relation { - fn def(&self) -> sea_orm::RelationDef { - match self { - Self::Anchor => Entity::belongs_to(crate::mega_code_review_anchor::Entity) - .from(Column::AnchorId) - .to(crate::mega_code_review_anchor::Column::Id) - .into(), - } - } -} - impl mega_code_review_position::Model { pub fn new( anchor_id: i64, diff --git a/jupiter/callisto/src/entity_ext/mega_code_review_thread.rs b/jupiter/callisto/src/entity_ext/mega_code_review_thread.rs index aec9806ec..78abaabc6 100644 --- a/jupiter/callisto/src/entity_ext/mega_code_review_thread.rs +++ b/jupiter/callisto/src/entity_ext/mega_code_review_thread.rs @@ -8,27 +8,23 @@ use crate::{ #[derive(Copy, Clone, Debug, EnumIter)] pub enum Relation { - MegaMr, - Comment, - Anchor, + MegaCl, } impl RelationTrait for Relation { - fn def(&self) -> sea_orm::RelationDef { + fn def(&self) -> RelationDef { match self { - Self::MegaMr => Entity::belongs_to(crate::mega_cl::Entity) + Self::MegaCl => Entity::belongs_to(crate::mega_cl::Entity) .from(Column::Link) .to(crate::mega_cl::Column::Link) .into(), - Self::Comment => Entity::has_many(crate::mega_code_review_comment::Entity).into(), - Self::Anchor => Entity::has_one(crate::mega_code_review_anchor::Entity).into(), } } } impl Related for Entity { fn to() -> RelationDef { - Relation::MegaMr.def() + Relation::MegaCl.def() } } diff --git a/jupiter/callisto/src/entity_ext/mega_conversation.rs b/jupiter/callisto/src/entity_ext/mega_conversation.rs index 56982e801..e6e7470bf 100644 --- a/jupiter/callisto/src/entity_ext/mega_conversation.rs +++ b/jupiter/callisto/src/entity_ext/mega_conversation.rs @@ -9,7 +9,7 @@ use crate::{ #[derive(Copy, Clone, Debug, EnumIter)] pub enum Relation { MegaIssue, - MegaMr, + MegaCl, Reactions, } @@ -20,7 +20,7 @@ impl RelationTrait for Relation { .from(Column::Link) .to(crate::mega_issue::Column::Link) .into(), - Self::MegaMr => Entity::belongs_to(crate::mega_cl::Entity) + Self::MegaCl => Entity::belongs_to(crate::mega_cl::Entity) .from(Column::Link) .to(crate::mega_cl::Column::Link) .into(), @@ -37,7 +37,7 @@ impl Related for Entity { impl Related for Entity { fn to() -> RelationDef { - Relation::MegaMr.def() + Relation::MegaCl.def() } } diff --git a/jupiter/callisto/src/entity_ext/reactions.rs b/jupiter/callisto/src/entity_ext/reactions.rs index 0961f57f5..35a47bd9d 100644 --- a/jupiter/callisto/src/entity_ext/reactions.rs +++ b/jupiter/callisto/src/entity_ext/reactions.rs @@ -2,7 +2,7 @@ use sea_orm::entity::prelude::*; use crate::{ entity_ext::{generate_id, generate_public_id}, - reactions::{self, Entity}, + reactions::{self, Column, Entity}, }; #[derive(Copy, Clone, Debug, EnumIter)] @@ -14,7 +14,7 @@ impl RelationTrait for Relation { fn def(&self) -> RelationDef { match self { Self::Conversation => Entity::belongs_to(crate::mega_conversation::Entity) - .from(reactions::Column::SubjectId) + .from(Column::SubjectId) .to(crate::mega_conversation::Column::Id) .into(), } diff --git a/jupiter/callisto/src/git_blob.rs b/jupiter/callisto/src/git_blob.rs index 652db9277..2056e16f4 100644 --- a/jupiter/callisto/src/git_blob.rs +++ b/jupiter/callisto/src/git_blob.rs @@ -1,14 +1,17 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "git_blob")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uniq_b_git_repo")] pub repo_id: i64, + #[sea_orm(unique_key = "uniq_b_git_repo")] pub blob_id: String, pub name: Option, pub size: i32, @@ -19,7 +22,4 @@ pub struct Model { pub is_delta_in_pack: bool, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/git_commit.rs b/jupiter/callisto/src/git_commit.rs index 94ae1ffd5..68f1a1ee7 100644 --- a/jupiter/callisto/src/git_commit.rs +++ b/jupiter/callisto/src/git_commit.rs @@ -1,14 +1,17 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "git_commit")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uniq_c_git_repo_id")] pub repo_id: i64, + #[sea_orm(unique_key = "uniq_c_git_repo_id")] pub commit_id: String, pub tree: String, pub parents_id: Json, @@ -23,7 +26,4 @@ pub struct Model { pub pack_offset: i64, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/git_issue.rs b/jupiter/callisto/src/git_issue.rs index ce7f4203d..378128908 100644 --- a/jupiter/callisto/src/git_issue.rs +++ b/jupiter/callisto/src/git_issue.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "git_issue")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -19,7 +20,4 @@ pub struct Model { pub repo_id: i64, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/git_pr.rs b/jupiter/callisto/src/git_pr.rs index 3c8c1e6a0..ba2e699b4 100644 --- a/jupiter/callisto/src/git_pr.rs +++ b/jupiter/callisto/src/git_pr.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "git_pr")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -29,7 +30,4 @@ pub struct Model { pub base_ref: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/git_repo.rs b/jupiter/callisto/src/git_repo.rs index 9301b2c1d..aedc7a983 100644 --- a/jupiter/callisto/src/git_repo.rs +++ b/jupiter/callisto/src/git_repo.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "git_repo")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -16,7 +17,4 @@ pub struct Model { pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/git_tag.rs b/jupiter/callisto/src/git_tag.rs index 9237f3099..271a37b0a 100644 --- a/jupiter/callisto/src/git_tag.rs +++ b/jupiter/callisto/src/git_tag.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "git_tag")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -24,7 +25,4 @@ pub struct Model { pub pack_offset: i64, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/git_tree.rs b/jupiter/callisto/src/git_tree.rs index df10ab480..7c0394684 100644 --- a/jupiter/callisto/src/git_tree.rs +++ b/jupiter/callisto/src/git_tree.rs @@ -1,14 +1,17 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "git_tree")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uniq_t_git_repo")] pub repo_id: i64, + #[sea_orm(unique_key = "uniq_t_git_repo")] pub tree_id: String, #[sea_orm(column_type = "VarBinary(StringLen::None)")] pub sub_trees: Vec, @@ -18,7 +21,4 @@ pub struct Model { pub pack_offset: i64, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/gpg_key.rs b/jupiter/callisto/src/gpg_key.rs index 0d5a151c7..c160766ce 100644 --- a/jupiter/callisto/src/gpg_key.rs +++ b/jupiter/callisto/src/gpg_key.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "gpg_key")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -22,7 +23,4 @@ pub struct Model { pub expires_at: Option, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/import_refs.rs b/jupiter/callisto/src/import_refs.rs index d61877117..39c75646a 100644 --- a/jupiter/callisto/src/import_refs.rs +++ b/jupiter/callisto/src/import_refs.rs @@ -1,17 +1,19 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::RefTypeEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "import_refs")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "uniq_ref_path_name")] pub repo_id: i64, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uniq_ref_path_name")] pub ref_name: String, pub ref_git_id: String, pub ref_type: RefTypeEnum, @@ -20,7 +22,4 @@ pub struct Model { pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/issue_cl_references.rs b/jupiter/callisto/src/issue_cl_references.rs index 3d4871fb9..aee3f9600 100644 --- a/jupiter/callisto/src/issue_cl_references.rs +++ b/jupiter/callisto/src/issue_cl_references.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::ReferenceTypeEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "issue_cl_references")] pub struct Model { pub created_at: DateTime, @@ -17,7 +18,4 @@ pub struct Model { pub reference_type: ReferenceTypeEnum, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/item_assignees.rs b/jupiter/callisto/src/item_assignees.rs index 3bd6abe6d..26561bb47 100644 --- a/jupiter/callisto/src/item_assignees.rs +++ b/jupiter/callisto/src/item_assignees.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "item_assignees")] pub struct Model { pub created_at: DateTime, @@ -15,7 +16,4 @@ pub struct Model { pub item_type: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/item_labels.rs b/jupiter/callisto/src/item_labels.rs index ac6a41469..8955b8e11 100644 --- a/jupiter/callisto/src/item_labels.rs +++ b/jupiter/callisto/src/item_labels.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "item_labels")] pub struct Model { pub created_at: DateTime, @@ -15,7 +16,4 @@ pub struct Model { pub item_type: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/label.rs b/jupiter/callisto/src/label.rs index 07facf4bc..aee44dd12 100644 --- a/jupiter/callisto/src/label.rs +++ b/jupiter/callisto/src/label.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "label")] pub struct Model { pub created_at: DateTime, @@ -15,7 +16,4 @@ pub struct Model { pub description: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/lfs_locks.rs b/jupiter/callisto/src/lfs_locks.rs index 524de63b9..03ca32af8 100644 --- a/jupiter/callisto/src/lfs_locks.rs +++ b/jupiter/callisto/src/lfs_locks.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "lfs_locks")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -12,7 +13,4 @@ pub struct Model { pub data: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/lfs_objects.rs b/jupiter/callisto/src/lfs_objects.rs index c87b2bf69..31ca63520 100644 --- a/jupiter/callisto/src/lfs_objects.rs +++ b/jupiter/callisto/src/lfs_objects.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "lfs_objects")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -12,7 +13,4 @@ pub struct Model { pub exist: bool, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_blob.rs b/jupiter/callisto/src/mega_blob.rs index da31b0bc2..3e8e871fd 100644 --- a/jupiter/callisto/src/mega_blob.rs +++ b/jupiter/callisto/src/mega_blob.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_blob")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -21,7 +22,4 @@ pub struct Model { pub commit_id: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_cl.rs b/jupiter/callisto/src/mega_cl.rs index fba576bbb..a506daf42 100644 --- a/jupiter/callisto/src/mega_cl.rs +++ b/jupiter/callisto/src/mega_cl.rs @@ -1,21 +1,23 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::MergeStatusEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_cl")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "idx_mr_path_link")] pub link: String, #[sea_orm(column_type = "Text")] pub title: String, pub merge_date: Option, pub status: MergeStatusEnum, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "idx_mr_path_link")] pub path: String, pub from_hash: String, pub to_hash: String, @@ -25,7 +27,4 @@ pub struct Model { pub base_branch: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_cl_commits.rs b/jupiter/callisto/src/mega_cl_commits.rs index 0aa818a9b..e7d474dc0 100644 --- a/jupiter/callisto/src/mega_cl_commits.rs +++ b/jupiter/callisto/src/mega_cl_commits.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_cl_commits")] pub struct Model { pub created_at: DateTime, @@ -18,7 +19,4 @@ pub struct Model { pub message: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_cl_reviewer.rs b/jupiter/callisto/src/mega_cl_reviewer.rs index 12fb7ec7a..73e70dfe1 100644 --- a/jupiter/callisto/src/mega_cl_reviewer.rs +++ b/jupiter/callisto/src/mega_cl_reviewer.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_cl_reviewer")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -16,7 +17,4 @@ pub struct Model { pub system_required: bool, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_code_review_anchor.rs b/jupiter/callisto/src/mega_code_review_anchor.rs index 9ac4c730b..96c61b8e0 100644 --- a/jupiter/callisto/src/mega_code_review_anchor.rs +++ b/jupiter/callisto/src/mega_code_review_anchor.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::DiffSideEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_code_review_anchor")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -23,32 +24,16 @@ pub struct Model { pub context_after: String, pub context_after_hash: String, pub created_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_one = "super::mega_code_review_position::Entity")] - MegaCodeReviewPosition, + #[sea_orm(has_one)] + pub mega_code_review_position: HasOne, #[sea_orm( - belongs_to = "super::mega_code_review_thread::Entity", - from = "Column::ThreadId", - to = "super::mega_code_review_thread::Column::Id", + belongs_to, + from = "thread_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - MegaCodeReviewThread, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaCodeReviewPosition.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaCodeReviewThread.def() - } + pub mega_code_review_thread: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_code_review_comment.rs b/jupiter/callisto/src/mega_code_review_comment.rs index 90ae056dc..f8ca89077 100644 --- a/jupiter/callisto/src/mega_code_review_comment.rs +++ b/jupiter/callisto/src/mega_code_review_comment.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_code_review_comment")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -15,32 +16,23 @@ pub struct Model { pub content: Option, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "Entity", - from = "Column::ParentId", - to = "Column::Id", + self_ref, + relation_enum = "SelfRef", + from = "parent_id", + to = "id", on_update = "NoAction", on_delete = "Cascade" )] - SelfRef, + pub mega_code_review_comment: BelongsTo>, #[sea_orm( - belongs_to = "super::mega_code_review_thread::Entity", - from = "Column::ThreadId", - to = "super::mega_code_review_thread::Column::Id", + belongs_to, + from = "thread_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - MegaCodeReviewThread, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaCodeReviewThread.def() - } + pub mega_code_review_thread: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_code_review_position.rs b/jupiter/callisto/src/mega_code_review_position.rs index 44abe8b1e..1c3caf046 100644 --- a/jupiter/callisto/src/mega_code_review_position.rs +++ b/jupiter/callisto/src/mega_code_review_position.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::{DiffSideEnum, PositionStatusEnum}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_code_review_position")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -20,24 +21,14 @@ pub struct Model { pub position_status: PositionStatusEnum, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::mega_code_review_anchor::Entity", - from = "Column::AnchorId", - to = "super::mega_code_review_anchor::Column::Id", + belongs_to, + from = "anchor_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - MegaCodeReviewAnchor, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaCodeReviewAnchor.def() - } + pub mega_code_review_anchor: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_code_review_thread.rs b/jupiter/callisto/src/mega_code_review_thread.rs index ef93c0137..95767b21f 100644 --- a/jupiter/callisto/src/mega_code_review_thread.rs +++ b/jupiter/callisto/src/mega_code_review_thread.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::ThreadStatusEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_code_review_thread")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -14,26 +15,10 @@ pub struct Model { pub thread_status: ThreadStatusEnum, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_one = "super::mega_code_review_anchor::Entity")] - MegaCodeReviewAnchor, - #[sea_orm(has_many = "super::mega_code_review_comment::Entity")] - MegaCodeReviewComment, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaCodeReviewAnchor.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaCodeReviewComment.def() - } + #[sea_orm(has_one)] + pub mega_code_review_anchor: HasOne, + #[sea_orm(has_many)] + pub mega_code_review_comments: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_commit.rs b/jupiter/callisto/src/mega_commit.rs index 8351bf3d8..f0b0fac62 100644 --- a/jupiter/callisto/src/mega_commit.rs +++ b/jupiter/callisto/src/mega_commit.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_commit")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -23,7 +24,4 @@ pub struct Model { pub pack_offset: i64, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_conversation.rs b/jupiter/callisto/src/mega_conversation.rs index e201d9611..a4f29e6c0 100644 --- a/jupiter/callisto/src/mega_conversation.rs +++ b/jupiter/callisto/src/mega_conversation.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::ConvTypeEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_conversation")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -20,7 +21,4 @@ pub struct Model { pub resolved: Option, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_group.rs b/jupiter/callisto/src/mega_group.rs index f5ab6e2ee..15666fcb8 100644 --- a/jupiter/callisto/src/mega_group.rs +++ b/jupiter/callisto/src/mega_group.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_group")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -13,26 +14,10 @@ pub struct Model { pub description: Option, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::mega_group_member::Entity")] - MegaGroupMember, - #[sea_orm(has_many = "super::mega_resource_permission::Entity")] - MegaResourcePermission, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaGroupMember.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaResourcePermission.def() - } + #[sea_orm(has_many)] + pub mega_group_members: HasMany, + #[sea_orm(has_many)] + pub mega_resource_permissions: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_group_member.rs b/jupiter/callisto/src/mega_group_member.rs index 60f08e592..69003d8b8 100644 --- a/jupiter/callisto/src/mega_group_member.rs +++ b/jupiter/callisto/src/mega_group_member.rs @@ -1,34 +1,27 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_group_member")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "idx_group_member_unique")] pub group_id: i64, + #[sea_orm(unique_key = "idx_group_member_unique")] pub username: String, pub joined_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::mega_group::Entity", - from = "Column::GroupId", - to = "super::mega_group::Column::Id", + belongs_to, + from = "group_id", + to = "id", on_update = "NoAction", on_delete = "Cascade" )] - MegaGroup, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaGroup.def() - } + pub mega_group: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_issue.rs b/jupiter/callisto/src/mega_issue.rs index 70457ed04..15e1859f6 100644 --- a/jupiter/callisto/src/mega_issue.rs +++ b/jupiter/callisto/src/mega_issue.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_issue")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -18,7 +19,4 @@ pub struct Model { pub author: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_refs.rs b/jupiter/callisto/src/mega_refs.rs index f16411d3c..21a7f5764 100644 --- a/jupiter/callisto/src/mega_refs.rs +++ b/jupiter/callisto/src/mega_refs.rs @@ -1,16 +1,17 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_refs")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uniq_mref_path")] pub path: String, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uniq_mref_path")] pub ref_name: String, pub ref_commit_hash: String, pub ref_tree_hash: String, @@ -19,7 +20,4 @@ pub struct Model { pub is_cl: bool, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_resource_permission.rs b/jupiter/callisto/src/mega_resource_permission.rs index c1149c903..a89dd16fb 100644 --- a/jupiter/callisto/src/mega_resource_permission.rs +++ b/jupiter/callisto/src/mega_resource_permission.rs @@ -1,39 +1,33 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::{PermissionEnum, ResourceTypeEnum}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_resource_permission")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "idx_resource_permission_unique")] pub resource_type: ResourceTypeEnum, + #[sea_orm(unique_key = "idx_resource_permission_unique")] pub resource_id: String, + #[sea_orm(unique_key = "idx_resource_permission_unique")] pub group_id: i64, pub permission: PermissionEnum, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::mega_group::Entity", - from = "Column::GroupId", - to = "super::mega_group::Column::Id", + belongs_to, + from = "group_id", + to = "id", on_update = "NoAction", on_delete = "Cascade" )] - MegaGroup, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaGroup.def() - } + pub mega_group: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_tag.rs b/jupiter/callisto/src/mega_tag.rs index a02920907..bb9c485b6 100644 --- a/jupiter/callisto/src/mega_tag.rs +++ b/jupiter/callisto/src/mega_tag.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_tag")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -23,7 +24,4 @@ pub struct Model { pub pack_offset: i64, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_tree.rs b/jupiter/callisto/src/mega_tree.rs index e48c86e4e..d773218c7 100644 --- a/jupiter/callisto/src/mega_tree.rs +++ b/jupiter/callisto/src/mega_tree.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_tree")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -19,7 +20,4 @@ pub struct Model { pub commit_id: String, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_webhook.rs b/jupiter/callisto/src/mega_webhook.rs index ecc711370..8694435ca 100644 --- a/jupiter/callisto/src/mega_webhook.rs +++ b/jupiter/callisto/src/mega_webhook.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_webhook")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -16,26 +17,10 @@ pub struct Model { pub active: bool, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::mega_webhook_delivery::Entity")] - MegaWebhookDelivery, - #[sea_orm(has_many = "super::mega_webhook_event_type::Entity")] - MegaWebhookEventType, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaWebhookDelivery.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaWebhookEventType.def() - } + #[sea_orm(has_many)] + pub mega_webhook_deliveries: HasMany, + #[sea_orm(has_many)] + pub mega_webhook_event_types: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_webhook_delivery.rs b/jupiter/callisto/src/mega_webhook_delivery.rs index 64ddae16a..2ed8a9744 100644 --- a/jupiter/callisto/src/mega_webhook_delivery.rs +++ b/jupiter/callisto/src/mega_webhook_delivery.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::WebhookEventTypeEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_webhook_delivery")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -22,24 +23,14 @@ pub struct Model { #[sea_orm(column_type = "Text", nullable)] pub error_message: Option, pub created_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::mega_webhook::Entity", - from = "Column::WebhookId", - to = "super::mega_webhook::Column::Id", + belongs_to, + from = "webhook_id", + to = "id", on_update = "NoAction", on_delete = "Cascade" )] - MegaWebhook, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaWebhook.def() - } + pub mega_webhook: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mega_webhook_event_type.rs b/jupiter/callisto/src/mega_webhook_event_type.rs index 1dc2090d3..fdbea82e5 100644 --- a/jupiter/callisto/src/mega_webhook_event_type.rs +++ b/jupiter/callisto/src/mega_webhook_event_type.rs @@ -1,35 +1,26 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::WebhookEventTypeEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "mega_webhook_event_type")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub webhook_id: i64, #[sea_orm(primary_key, auto_increment = false)] pub event_type: WebhookEventTypeEnum, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::mega_webhook::Entity", - from = "Column::WebhookId", - to = "super::mega_webhook::Column::Id", + belongs_to, + from = "webhook_id", + to = "id", on_update = "NoAction", on_delete = "Cascade" )] - MegaWebhook, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::MegaWebhook.def() - } + pub mega_webhook: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/merge_queue.rs b/jupiter/callisto/src/merge_queue.rs index 031f6c0b3..adcbe4a83 100644 --- a/jupiter/callisto/src/merge_queue.rs +++ b/jupiter/callisto/src/merge_queue.rs @@ -1,11 +1,12 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::{QueueFailureTypeEnum, QueueStatusEnum}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "merge_queue")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -23,7 +24,4 @@ pub struct Model { pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/mod.rs b/jupiter/callisto/src/mod.rs index a919f2a46..19adea8f4 100644 --- a/jupiter/callisto/src/mod.rs +++ b/jupiter/callisto/src/mod.rs @@ -1,4 +1,4 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 pub mod prelude; diff --git a/jupiter/callisto/src/non_member_note_views.rs b/jupiter/callisto/src/non_member_note_views.rs index 68436f525..4fe0dccee 100644 --- a/jupiter/callisto/src/non_member_note_views.rs +++ b/jupiter/callisto/src/non_member_note_views.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "non_member_note_views")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -17,7 +18,4 @@ pub struct Model { pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/note_views.rs b/jupiter/callisto/src/note_views.rs index 00cf9465d..ae3458e80 100644 --- a/jupiter/callisto/src/note_views.rs +++ b/jupiter/callisto/src/note_views.rs @@ -1,20 +1,20 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "note_views")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "index_note_views_on_note_id_and_user_id")] pub note_id: i64, + #[sea_orm(unique_key = "index_note_views_on_note_id_and_user_id")] pub user_id: i64, pub created_at: DateTime, pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/notes.rs b/jupiter/callisto/src/notes.rs index a5d88769a..bab31a972 100644 --- a/jupiter/callisto/src/notes.rs +++ b/jupiter/callisto/src/notes.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "notes")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -31,7 +32,4 @@ pub struct Model { pub content_updated_at: Option, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/notification_event_types.rs b/jupiter/callisto/src/notification_event_types.rs index a50531f56..42e17e364 100644 --- a/jupiter/callisto/src/notification_event_types.rs +++ b/jupiter/callisto/src/notification_event_types.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "notification_event_types")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -15,39 +16,10 @@ pub struct Model { pub default_enabled: bool, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::email_jobs::Entity")] - EmailJobs, - #[sea_orm(has_many = "super::user_notification_preferences::Entity")] - UserNotificationPreferences, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::EmailJobs.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::UserNotificationPreferences.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - super::user_notification_preferences::Relation::UserNotificationSettings.def() - } - fn via() -> Option { - Some( - super::user_notification_preferences::Relation::NotificationEventTypes - .def() - .rev(), - ) - } + #[sea_orm(has_many)] + pub email_jobs: HasMany, + #[sea_orm(has_many, via = "user_notification_preferences")] + pub user_notification_settings: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/orion_tasks.rs b/jupiter/callisto/src/orion_tasks.rs index 5b882a3c9..46386a178 100644 --- a/jupiter/callisto/src/orion_tasks.rs +++ b/jupiter/callisto/src/orion_tasks.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "orion_tasks")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -13,34 +14,12 @@ pub struct Model { pub repo_name: String, pub cl: String, pub created_at: DateTimeWithTimeZone, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::build_events::Entity")] - BuildEvents, - #[sea_orm(has_many = "super::build_targets::Entity")] - BuildTargets, - #[sea_orm(has_many = "super::target_build_status::Entity")] - TargetBuildStatus, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BuildEvents.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BuildTargets.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::TargetBuildStatus.def() - } + #[sea_orm(has_many)] + pub build_events: HasMany, + #[sea_orm(has_many)] + pub build_targets: HasMany, + #[sea_orm(has_many)] + pub target_build_statuses: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/path_check_configs.rs b/jupiter/callisto/src/path_check_configs.rs index 45eef0a28..f9b2ab4cf 100644 --- a/jupiter/callisto/src/path_check_configs.rs +++ b/jupiter/callisto/src/path_check_configs.rs @@ -1,24 +1,24 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::CheckTypeEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "path_check_configs")] pub struct Model { pub created_at: DateTime, pub updated_at: DateTime, #[sea_orm(primary_key, auto_increment = false)] pub id: i64, + #[sea_orm(unique_key = "path_check_type_unique")] pub path: String, + #[sea_orm(unique_key = "path_check_type_unique")] pub check_type_code: CheckTypeEnum, pub enabled: bool, pub required: bool, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/prelude.rs b/jupiter/callisto/src/prelude.rs index c12af51f3..4050a30c7 100644 --- a/jupiter/callisto/src/prelude.rs +++ b/jupiter/callisto/src/prelude.rs @@ -1,4 +1,4 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 pub use super::{ access_token::Entity as AccessToken, artifact_objects::Entity as ArtifactObjects, diff --git a/jupiter/callisto/src/reactions.rs b/jupiter/callisto/src/reactions.rs index 6a9a78802..3b3ff17f9 100644 --- a/jupiter/callisto/src/reactions.rs +++ b/jupiter/callisto/src/reactions.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "reactions")] pub struct Model { pub created_at: DateTime, @@ -19,7 +20,4 @@ pub struct Model { pub discarded_at: Option, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/sea_orm_active_enums.rs b/jupiter/callisto/src/sea_orm_active_enums.rs index 74b45dce5..a1828ad0e 100644 --- a/jupiter/callisto/src/sea_orm_active_enums.rs +++ b/jupiter/callisto/src/sea_orm_active_enums.rs @@ -1,10 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "actor_type_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "actor_type_enum")] pub enum ActorTypeEnum { #[sea_orm(string_value = "human")] Human, @@ -12,7 +12,7 @@ pub enum ActorTypeEnum { Bot, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "audit_action_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "audit_action_enum")] pub enum AuditActionEnum { #[sea_orm(string_value = "create")] Create, @@ -40,7 +40,7 @@ pub enum AuditActionEnum { Access, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "bot_status_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "bot_status_enum")] pub enum BotStatusEnum { #[sea_orm(string_value = "enabled")] Enabled, @@ -48,7 +48,7 @@ pub enum BotStatusEnum { Disabled, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "check_type_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "check_type_enum")] pub enum CheckTypeEnum { #[sea_orm(string_value = "gpg_signature")] GpgSignature, @@ -68,7 +68,7 @@ pub enum CheckTypeEnum { ClaSign, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "conv_type_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "conv_type_enum")] pub enum ConvTypeEnum { #[sea_orm(string_value = "comment")] Comment, @@ -102,7 +102,7 @@ pub enum ConvTypeEnum { Draft, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "diff_side_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "diff_side_enum")] pub enum DiffSideEnum { #[sea_orm(string_value = "new")] New, @@ -111,7 +111,7 @@ pub enum DiffSideEnum { } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( - rs_type = "String", + rs_type = "Enum", db_type = "Enum", enum_name = "installation_bot_status_enum" )] @@ -123,7 +123,7 @@ pub enum InstallationBotStatusEnum { } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( - rs_type = "String", + rs_type = "Enum", db_type = "Enum", enum_name = "installation_target_type_enum" )] @@ -134,7 +134,7 @@ pub enum InstallationTargetTypeEnum { Repository, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "merge_status_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "merge_status_enum")] pub enum MergeStatusEnum { #[sea_orm(string_value = "open")] Open, @@ -147,7 +147,7 @@ pub enum MergeStatusEnum { } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( - rs_type = "String", + rs_type = "Enum", db_type = "Enum", enum_name = "orion_target_status_enum" )] @@ -162,7 +162,7 @@ pub enum OrionTargetStatusEnum { Failed, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "permission_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "permission_enum")] pub enum PermissionEnum { #[sea_orm(string_value = "read")] Read, @@ -173,7 +173,7 @@ pub enum PermissionEnum { } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( - rs_type = "String", + rs_type = "Enum", db_type = "Enum", enum_name = "permission_scope_enum" )] @@ -186,11 +186,7 @@ pub enum PermissionScopeEnum { Admin, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm( - rs_type = "String", - db_type = "Enum", - enum_name = "position_status_enum" -)] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "position_status_enum")] pub enum PositionStatusEnum { #[sea_orm(string_value = "exact")] Exact, @@ -205,7 +201,7 @@ pub enum PositionStatusEnum { } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( - rs_type = "String", + rs_type = "Enum", db_type = "Enum", enum_name = "queue_failure_type_enum" )] @@ -224,7 +220,7 @@ pub enum QueueFailureTypeEnum { Timeout, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "queue_status_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "queue_status_enum")] pub enum QueueStatusEnum { #[sea_orm(string_value = "waiting")] Waiting, @@ -238,7 +234,7 @@ pub enum QueueStatusEnum { Failed, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "ref_type_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "ref_type_enum")] pub enum RefTypeEnum { #[sea_orm(string_value = "branch")] Branch, @@ -246,11 +242,7 @@ pub enum RefTypeEnum { Tag, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm( - rs_type = "String", - db_type = "Enum", - enum_name = "reference_type_enum" -)] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "reference_type_enum")] pub enum ReferenceTypeEnum { #[sea_orm(string_value = "mention")] Mention, @@ -260,13 +252,13 @@ pub enum ReferenceTypeEnum { Blocks, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "resource_type_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "resource_type_enum")] pub enum ResourceTypeEnum { #[sea_orm(string_value = "note")] Note, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "target_type_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "target_type_enum")] pub enum TargetTypeEnum { #[sea_orm(string_value = "bot")] Bot, @@ -282,7 +274,7 @@ pub enum TargetTypeEnum { User, } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] -#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "thread_status_enum")] +#[sea_orm(rs_type = "Enum", db_type = "Enum", enum_name = "thread_status_enum")] pub enum ThreadStatusEnum { #[sea_orm(string_value = "resolved")] Resolved, @@ -291,22 +283,22 @@ pub enum ThreadStatusEnum { } #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Serialize, Deserialize)] #[sea_orm( - rs_type = "String", + rs_type = "Enum", db_type = "Enum", enum_name = "webhook_event_type_enum" )] pub enum WebhookEventTypeEnum { - #[sea_orm(string_value = "cl.created")] + #[sea_orm(string_value = "cl_created")] ClCreated, - #[sea_orm(string_value = "cl.updated")] + #[sea_orm(string_value = "cl_updated")] ClUpdated, - #[sea_orm(string_value = "cl.merged")] + #[sea_orm(string_value = "cl_merged")] ClMerged, - #[sea_orm(string_value = "cl.closed")] + #[sea_orm(string_value = "cl_closed")] ClClosed, - #[sea_orm(string_value = "cl.reopened")] + #[sea_orm(string_value = "cl_reopened")] ClReopened, - #[sea_orm(string_value = "cl.comment.created")] + #[sea_orm(string_value = "cl_comment_created")] ClCommentCreated, #[sea_orm(string_value = "all")] All, diff --git a/jupiter/callisto/src/ssh_keys.rs b/jupiter/callisto/src/ssh_keys.rs index 6756d3ee2..2c3cd196c 100644 --- a/jupiter/callisto/src/ssh_keys.rs +++ b/jupiter/callisto/src/ssh_keys.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "ssh_keys")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -18,7 +19,4 @@ pub struct Model { pub created_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/target_build_status.rs b/jupiter/callisto/src/target_build_status.rs index 8afffb692..25423794e 100644 --- a/jupiter/callisto/src/target_build_status.rs +++ b/jupiter/callisto/src/target_build_status.rs @@ -1,49 +1,41 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use super::sea_orm_active_enums::OrionTargetStatusEnum; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "target_build_status")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, + #[sea_orm(unique_key = "uq_target_build_status_identity")] pub task_id: Uuid, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uq_target_build_status_identity")] pub target_package: String, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uq_target_build_status_identity")] pub target_name: String, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uq_target_build_status_identity")] pub target_configuration: String, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uq_target_build_status_identity")] pub category: String, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uq_target_build_status_identity")] pub identifier: String, - #[sea_orm(column_type = "Text")] + #[sea_orm(column_type = "Text", unique_key = "uq_target_build_status_identity")] pub action: String, pub status: OrionTargetStatusEnum, pub created_at: DateTimeWithTimeZone, pub updated_at: DateTimeWithTimeZone, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::orion_tasks::Entity", - from = "Column::TaskId", - to = "super::orion_tasks::Column::Id", + belongs_to, + from = "task_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - OrionTasks, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::OrionTasks.def() - } + pub orion_tasks: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/target_state_histories.rs b/jupiter/callisto/src/target_state_histories.rs index ee0fd4f32..4e8db7785 100644 --- a/jupiter/callisto/src/target_state_histories.rs +++ b/jupiter/callisto/src/target_state_histories.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "target_state_histories")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -13,38 +14,22 @@ pub struct Model { #[sea_orm(column_type = "Text")] pub target_state: String, pub created_at: DateTimeWithTimeZone, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::build_events::Entity", - from = "Column::BuildEventId", - to = "super::build_events::Column::Id", + belongs_to, + from = "build_event_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - BuildEvents, + pub build_events: BelongsTo, #[sea_orm( - belongs_to = "super::build_targets::Entity", - from = "Column::BuildTargetId", - to = "super::build_targets::Column::Id", + belongs_to, + from = "build_target_id", + to = "id", on_update = "Cascade", on_delete = "Cascade" )] - BuildTargets, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BuildEvents.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::BuildTargets.def() - } + pub build_targets: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/user_approval_status.rs b/jupiter/callisto/src/user_approval_status.rs index f72169c86..7b5efdcc6 100644 --- a/jupiter/callisto/src/user_approval_status.rs +++ b/jupiter/callisto/src/user_approval_status.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "user_approval_status")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -18,7 +19,4 @@ pub struct Model { pub updated_at: DateTime, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/user_notification_preferences.rs b/jupiter/callisto/src/user_notification_preferences.rs index 46235d295..9bfbd83aa 100644 --- a/jupiter/callisto/src/user_notification_preferences.rs +++ b/jupiter/callisto/src/user_notification_preferences.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "user_notification_preferences")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -13,38 +14,22 @@ pub struct Model { pub enabled: bool, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { #[sea_orm( - belongs_to = "super::notification_event_types::Entity", - from = "Column::EventTypeCode", - to = "super::notification_event_types::Column::Code", + belongs_to, + from = "event_type_code", + to = "code", on_update = "Cascade", on_delete = "Restrict" )] - NotificationEventTypes, + pub notification_event_types: BelongsTo, #[sea_orm( - belongs_to = "super::user_notification_settings::Entity", - from = "Column::Username", - to = "super::user_notification_settings::Column::Username", + belongs_to, + from = "username", + to = "username", on_update = "Cascade", on_delete = "Cascade" )] - UserNotificationSettings, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::NotificationEventTypes.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::UserNotificationSettings.def() - } + pub user_notification_settings: BelongsTo, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/user_notification_settings.rs b/jupiter/callisto/src/user_notification_settings.rs index efbb0a379..2dfc7f5bf 100644 --- a/jupiter/callisto/src/user_notification_settings.rs +++ b/jupiter/callisto/src/user_notification_settings.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "user_notification_settings")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] @@ -13,31 +14,8 @@ pub struct Model { pub delivery_mode: String, pub created_at: DateTime, pub updated_at: DateTime, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm(has_many = "super::user_notification_preferences::Entity")] - UserNotificationPreferences, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::UserNotificationPreferences.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - super::user_notification_preferences::Relation::NotificationEventTypes.def() - } - fn via() -> Option { - Some( - super::user_notification_preferences::Relation::UserNotificationSettings - .def() - .rev(), - ) - } + #[sea_orm(has_many, via = "user_notification_preferences")] + pub notification_event_types: HasMany, } impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/callisto/src/vault.rs b/jupiter/callisto/src/vault.rs index 4d6b1655a..af2aa169a 100644 --- a/jupiter/callisto/src/vault.rs +++ b/jupiter/callisto/src/vault.rs @@ -1,9 +1,10 @@ -//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.20 +//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] +#[sea_orm::model] +#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)] #[sea_orm(table_name = "vault")] pub struct Model { #[sea_orm(primary_key)] @@ -14,7 +15,4 @@ pub struct Model { pub value: Vec, } -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation {} - impl ActiveModelBehavior for ActiveModel {} diff --git a/jupiter/src/service/webhook_service.rs b/jupiter/src/service/webhook_service.rs index 0a0b0233b..d4f1d6e88 100644 --- a/jupiter/src/service/webhook_service.rs +++ b/jupiter/src/service/webhook_service.rs @@ -125,7 +125,7 @@ impl WebhookService { cl_payload: ClPayload, path: &str, ) -> Result<(), common::errors::MegaError> { - let event_type_str = event_type.to_value(); + let event_type_str = event_type.to_value().value.into_owned(); let webhooks = self .storage .find_matching_webhooks(event_type.clone(), path) diff --git a/jupiter/src/storage/artifact_storage.rs b/jupiter/src/storage/artifact_storage.rs index 96a55d275..30da0b8a9 100644 --- a/jupiter/src/storage/artifact_storage.rs +++ b/jupiter/src/storage/artifact_storage.rs @@ -3,7 +3,7 @@ use std::ops::Deref; use callisto::{artifact_objects, artifact_set_files, artifact_sets}; use common::errors::MegaError; use sea_orm::{ - ColumnTrait, Condition, EntityTrait, JoinType, QueryFilter, QueryOrder, QuerySelect, + ColumnTrait, Condition, EntityTrait, ExprTrait, JoinType, QueryFilter, QueryOrder, QuerySelect, QueryTrait, RelationTrait, Value as SeaValue, sea_query::Expr, }; @@ -45,21 +45,21 @@ impl ArtifactStorage { q = q.filter(Expr::cust_with_values( r#"(metadata ->> 'run_id') = $1 AND (metadata ->> 'commit_sha') = $2"#, [ - SeaValue::String(Some(Box::new(run_id.to_owned()))), - SeaValue::String(Some(Box::new(commit_sha.to_owned()))), + SeaValue::String(Some(run_id.to_owned())), + SeaValue::String(Some(commit_sha.to_owned())), ], )); } (Some(run_id), None) => { q = q.filter(Expr::cust_with_values( r#"(metadata ->> 'run_id') = $1"#, - [SeaValue::String(Some(Box::new(run_id.to_owned())))], + [SeaValue::String(Some(run_id.to_owned()))], )); } (None, Some(commit_sha)) => { q = q.filter(Expr::cust_with_values( r#"(metadata ->> 'commit_sha') = $1"#, - [SeaValue::String(Some(Box::new(commit_sha.to_owned())))], + [SeaValue::String(Some(commit_sha.to_owned()))], )); } (None, None) => {} @@ -79,21 +79,21 @@ impl ArtifactStorage { q = q.filter(Expr::cust_with_values( r#"(metadata ->> 'run_id') = $1 AND (metadata ->> 'commit_sha') = $2"#, [ - SeaValue::String(Some(Box::new(run_id.to_owned()))), - SeaValue::String(Some(Box::new(commit_sha.to_owned()))), + SeaValue::String(Some(run_id.to_owned())), + SeaValue::String(Some(commit_sha.to_owned())), ], )); } (Some(run_id), None) => { q = q.filter(Expr::cust_with_values( r#"(metadata ->> 'run_id') = $1"#, - [SeaValue::String(Some(Box::new(run_id.to_owned())))], + [SeaValue::String(Some(run_id.to_owned()))], )); } (None, Some(commit_sha)) => { q = q.filter(Expr::cust_with_values( r#"(metadata ->> 'commit_sha') = $1"#, - [SeaValue::String(Some(Box::new(commit_sha.to_owned())))], + [SeaValue::String(Some(commit_sha.to_owned()))], )); } (None, None) => {} @@ -296,7 +296,7 @@ impl ArtifactStorage { .filter(artifact_objects::Column::LastSeenAt.lt(last_seen_before)) .filter(no_manifest_row) .order_by_asc(artifact_objects::Column::LastSeenAt) - .limit(limit.max(1)) + .limit(std::cmp::max(limit, 1)) .all(conn) .await .map_err(MegaError::Db) diff --git a/jupiter/src/storage/cl_storage.rs b/jupiter/src/storage/cl_storage.rs index 810e428de..64e682ab3 100644 --- a/jupiter/src/storage/cl_storage.rs +++ b/jupiter/src/storage/cl_storage.rs @@ -413,7 +413,7 @@ impl ClStorage { ]) .to_owned(), ) - .do_nothing() + .try_insert() .exec(self.get_connection()) .await?; Ok(()) diff --git a/jupiter/src/storage/gpg_storage.rs b/jupiter/src/storage/gpg_storage.rs index 16bef0abe..27653cbdc 100644 --- a/jupiter/src/storage/gpg_storage.rs +++ b/jupiter/src/storage/gpg_storage.rs @@ -8,7 +8,8 @@ use pgp::{ types::KeyDetails, }; use sea_orm::{ - ActiveModelTrait, ColumnTrait, EntityTrait, IntoActiveModel, QueryFilter, prelude::Expr, + ActiveModelTrait, ColumnTrait, EntityTrait, ExprTrait, IntoActiveModel, QueryFilter, + prelude::Expr, }; use crate::storage::base_storage::{BaseStorage, StorageConnector}; diff --git a/mono/Cargo.toml b/mono/Cargo.toml index d50dee421..4bc0a87e5 100644 --- a/mono/Cargo.toml +++ b/mono/Cargo.toml @@ -61,7 +61,6 @@ uuid = { workspace = true } async-stream = { workspace = true } reqwest = { workspace = true, features = ["json", "stream", "blocking"] } regex = { workspace = true } -ed25519-dalek = { workspace = true, features = ["pkcs8"] } ctrlc = { workspace = true } tower-sessions = { workspace = true, features = ["memory-store"] } time = { workspace = true, features = ["serde"] } diff --git a/mono/src/api/router/admin_router.rs b/mono/src/api/router/admin_router.rs index bc6d3319c..80d9903b0 100644 --- a/mono/src/api/router/admin_router.rs +++ b/mono/src/api/router/admin_router.rs @@ -3,6 +3,7 @@ //! Provides endpoints for admin permission checks and user account approval: //! - `GET /api/v1/admin/me` - Check if current user is admin //! - `GET /api/v1/admin/list` - List all admins (admin-only) +//! - `POST /api/v1/admin/cedar/generate` - Generate `.mega_cedar.json` from admin list //! - `GET /api/v1/admin/user-approvals` - List user approval records (admin-only) //! - `POST /api/v1/admin/user-approvals/{username}/approve` - Approve a user (admin-only) //! - `POST /api/v1/admin/user-approvals/{username}/reject` - Reject a user (admin-only) @@ -11,13 +12,15 @@ //! - 401 Unauthorized: No valid session (handled by `LoginUser` extractor) //! - 403 Forbidden: Logged in but not admin (for admin-only endpoints) +use std::collections::BTreeSet; + use api_model::common::CommonResult; use axum::{ Json, extract::{Path, Query, State}, }; use ceres::model::{ - admin::{AdminListResponse, IsAdminResponse}, + admin::{AdminListResponse, GenerateCedarRequest, GenerateCedarResponse, IsAdminResponse}, user::{ListUserApprovalsQuery, UserApprovalListRes, UserApprovalStatusRes}, }; use utoipa_axum::{router::OpenApiRouter, routes}; @@ -34,6 +37,7 @@ pub fn routers() -> OpenApiRouter { OpenApiRouter::new() .routes(routes!(is_admin_me)) .routes(routes!(admin_list)) + .routes(routes!(generate_cedar)) .routes(routes!(list_user_approvals)) .routes(routes!(approve_user)) .routes(routes!(reject_user)), @@ -94,6 +98,56 @@ async fn admin_list( })))) } +/// POST /api/v1/admin/cedar/generate +/// +/// Generate `.mega_cedar.json` content from a list of admin usernames. +/// Only admins can access this endpoint. Does not write to the repository. +#[utoipa::path( + post, + path = "/cedar/generate", + request_body = GenerateCedarRequest, + responses( + (status = 200, body = CommonResult), + (status = 400, description = "Empty admin list"), + (status = 401, description = "Unauthorized"), + (status = 403, description = "Forbidden - not admin"), + ), + tag = USER_TAG +)] +async fn generate_cedar( + user: LoginUser, + State(state): State, + Json(payload): Json, +) -> Result>, ApiError> { + ensure_admin(&state, &user).await?; + + let admins: Vec = payload + .admins + .into_iter() + .map(|name| name.trim().to_string()) + .filter(|name| !name.is_empty()) + .collect::>() + .into_iter() + .collect(); + + if admins.is_empty() { + return Err(ApiError::bad_request(anyhow::anyhow!( + "admins must not be empty" + ))); + } + + let content = saturn::entitystore::generate_entity(&admins, "/").map_err(|e| { + ApiError::internal(anyhow::anyhow!( + "Failed to generate .mega_cedar.json: {}", + e + )) + })?; + + Ok(Json(CommonResult::success(Some(GenerateCedarResponse { + content, + })))) +} + /// GET /api/v1/admin/user-approvals /// /// List user account approval records. Defaults to pending. diff --git a/mono/src/git_protocol/ssh.rs b/mono/src/git_protocol/ssh.rs index 7a6370df7..d003093e1 100644 --- a/mono/src/git_protocol/ssh.rs +++ b/mono/src/git_protocol/ssh.rs @@ -16,7 +16,7 @@ use futures::{StreamExt, stream}; use russh::{ Channel, ChannelId, keys::{HashAlg, PublicKey}, - server::{self, Auth, Msg, Session}, + server::{self, Auth, ChannelOpenHandle, Msg, Session}, }; use tokio::{io::AsyncReadExt, sync::Mutex}; @@ -51,14 +51,16 @@ impl server::Handler for SshServer { async fn channel_open_session( &mut self, channel: Channel, + reply: ChannelOpenHandle, _: &mut Session, - ) -> Result { + ) -> Result<(), Self::Error> { tracing::info!("SshServer::channel_open_session:{}", channel.id()); { let mut clients = self.clients.lock().await; clients.insert((self.id, channel.id()), channel); } - Ok(true) + reply.accept().await; + Ok(()) } /// # Executes a request on the SSH server. diff --git a/mono/src/server/ssh_server.rs b/mono/src/server/ssh_server.rs index 2bf653ea1..e987a9484 100644 --- a/mono/src/server/ssh_server.rs +++ b/mono/src/server/ssh_server.rs @@ -3,10 +3,9 @@ use std::{collections::HashMap, net::SocketAddr, str::FromStr, sync::Arc}; use bytes::BytesMut; use ceres::{TransportRuntime, application::api_service::cache::GitObjectCache}; use clap::Args; -use ed25519_dalek::pkcs8::spki::der::pem::LineEnding; use russh::{ Preferred, - keys::{Algorithm, PrivateKey}, + keys::{Algorithm, PrivateKey, ssh_key::LineEnding}, server::Server, }; use tokio::sync::Mutex; diff --git a/moon/apps/web/components/CodeView/BlobView/BlobEditor.tsx b/moon/apps/web/components/CodeView/BlobView/BlobEditor.tsx index 3054111d7..80ec70ee7 100644 --- a/moon/apps/web/components/CodeView/BlobView/BlobEditor.tsx +++ b/moon/apps/web/components/CodeView/BlobView/BlobEditor.tsx @@ -13,6 +13,8 @@ import { useGetCurrentUser } from '@/hooks/useGetCurrentUser' import { useUpdateBlob } from '@/hooks/useUpdateBlob' import { getLanguageForFile } from '@/utils/shikiLanguageFallback' +import { MegaCedarAdminPicker } from './MegaCedarAdminPicker' + interface BlobEditorProps { fileContent: string filePath: string @@ -22,6 +24,10 @@ interface BlobEditorProps { type ViewMode = 'edit' | 'preview' +function isMegaCedarJsonFile(name: string, path: string) { + return name === '.mega_cedar.json' || path.endsWith('/.mega_cedar.json') || path === '.mega_cedar.json' +} + export default function BlobEditor({ fileContent, filePath, fileName, onCancel }: BlobEditorProps) { const { data: currentUser } = useGetCurrentUser() @@ -63,8 +69,16 @@ export default function BlobEditor({ fileContent, filePath, fileName, onCancel } return dir ? `${dir}/${editedFileName}` : editedFileName }, [pathSegments, editedFileName]) + const showCedarAdminPicker = isMegaCedarJsonFile(editedFileName, fullEditedPath) + const detectedLanguage = useMemo(() => getLanguageForFile(editedFileName), [editedFileName]) + const handleCedarContentGenerated = useCallback((generated: string) => { + setContent(generated) + setDiffResult(null) + setFileDiffMetadata(null) + }, []) + const handlePreviewClick = useCallback(async () => { setViewMode('preview') @@ -289,6 +303,14 @@ export default function BlobEditor({ fileContent, filePath, fileName, onCancel } + {showCedarAdminPicker && viewMode === 'edit' && ( + + )} +
{viewMode === 'edit' && renderEditView()} {viewMode === 'preview' && renderPreviewView()} diff --git a/moon/apps/web/components/CodeView/BlobView/MegaCedarAdminPicker.tsx b/moon/apps/web/components/CodeView/BlobView/MegaCedarAdminPicker.tsx new file mode 100644 index 000000000..ec9e920a1 --- /dev/null +++ b/moon/apps/web/components/CodeView/BlobView/MegaCedarAdminPicker.tsx @@ -0,0 +1,217 @@ +'use client' + +import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import toast from 'react-hot-toast' + +import { LoadingSpinner } from '@gitmono/ui' + +import { useAdminList } from '@/hooks/admin/useAdminList' +import { useGenerateMegaCedar } from '@/hooks/admin/useGenerateMegaCedar' +import { useGetSyncMembers } from '@/hooks/useGetSyncMembers' + +const ADMIN_GROUP = 'UserGroup::"admin"' + +function parseAdminsFromCedarContent(content: string): string[] { + try { + const parsed = JSON.parse(content) as { + users?: Record + } + const users = parsed.users || {} + const admins: string[] = [] + + for (const [key, value] of Object.entries(users)) { + const parents = value?.parents || [] + + if (!parents.includes(ADMIN_GROUP)) continue + + const match = key.match(/^User::"(.+)"$/) + + if (match?.[1]) { + admins.push(match[1]) + } + } + + return admins.sort() + } catch { + return [] + } +} + +interface MegaCedarAdminPickerProps { + fileContent: string + onContentGenerated: (content: string) => void + disabled?: boolean +} + +export function MegaCedarAdminPicker({ fileContent, onContentGenerated, disabled = false }: MegaCedarAdminPickerProps) { + const [memberSearchQuery, setMemberSearchQuery] = useState('') + const [selectedAdmins, setSelectedAdmins] = useState([]) + const initializedRef = useRef(false) + + const { + members, + isLoading: isMembersLoading, + refetch: refetchMembers, + error: membersError + } = useGetSyncMembers({ + query: memberSearchQuery, + excludeCurrentUser: false, + enabled: true + }) + + const { data: adminListData, isLoading: isAdminListLoading } = useAdminList() + const generateCedar = useGenerateMegaCedar() + + const parsedAdmins = useMemo(() => parseAdminsFromCedarContent(fileContent), [fileContent]) + + useEffect(() => { + if (initializedRef.current) return + + if (parsedAdmins.length > 0) { + setSelectedAdmins(parsedAdmins) + initializedRef.current = true + return + } + + if (!isAdminListLoading && adminListData?.data?.admins) { + setSelectedAdmins([...(adminListData.data.admins || [])].sort()) + initializedRef.current = true + } + }, [parsedAdmins, adminListData, isAdminListLoading]) + + const regenerateContent = useCallback( + async (admins: string[]) => { + if (admins.length === 0) { + toast.error('Select at least one admin') + return + } + + try { + const response = await generateCedar.mutateAsync({ admins }) + const content = response?.data?.content + + if (content) { + onContentGenerated(content) + } else { + toast.error('Failed to generate .mega_cedar.json') + } + } catch { + // apiErrorToast handles the error + } + }, + [generateCedar, onContentGenerated] + ) + + const handleToggle = useCallback( + (username: string) => { + setSelectedAdmins((prev) => { + const next = prev.includes(username) ? prev.filter((u) => u !== username) : [...prev, username].sort() + + if (next.length === 0) { + toast.error('Select at least one admin') + return prev + } + + void regenerateContent(next) + return next + }) + }, + [regenerateContent] + ) + + const isLoading = isMembersLoading || isAdminListLoading + + return ( +
+
+
+
System admins
+
+ Select users to regenerate .mega_cedar.json +
+
+ {generateCedar.isPending && ( +
+ + Generating… +
+ )} +
+ + {membersError && ( +
+

Failed to load organization members

+ +
+ )} + + setMemberSearchQuery(e.target.value)} + className='mb-3 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500' + placeholder='Search members by name or username...' + disabled={disabled || !!membersError || generateCedar.isPending} + /> + +
+ {isLoading ? ( +
+ + Loading members… +
+ ) : members.length === 0 ? ( +
No members found
+ ) : ( +
+ {members.map((member) => { + const username = member.user.username + const isSelected = selectedAdmins.includes(username) + + return ( + + ) + })} +
+ )} +
+ +
+ Selected: {selectedAdmins.length > 0 ? selectedAdmins.join(', ') : 'none'} +
+
+ ) +} diff --git a/moon/apps/web/hooks/admin/useGenerateMegaCedar.ts b/moon/apps/web/hooks/admin/useGenerateMegaCedar.ts new file mode 100644 index 000000000..871c1ac84 --- /dev/null +++ b/moon/apps/web/hooks/admin/useGenerateMegaCedar.ts @@ -0,0 +1,15 @@ +import { useMutation } from '@tanstack/react-query' + +import type { GenerateCedarRequest } from '@gitmono/types' + +import { apiErrorToast } from '@/utils/apiErrorToast' +import { legacyApiClient } from '@/utils/queryClient' + +export function useGenerateMegaCedar() { + const api = legacyApiClient.v1.postApiAdminCedarGenerate() + + return useMutation({ + mutationFn: (data: GenerateCedarRequest) => api.request(data), + onError: apiErrorToast + }) +} diff --git a/moon/packages/types/generated.ts b/moon/packages/types/generated.ts index 10ceef69e..ec620b396 100644 --- a/moon/packages/types/generated.ts +++ b/moon/packages/types/generated.ts @@ -4047,6 +4047,15 @@ export type CommonResultFilesChangedPage = { req_result: boolean } +export type CommonResultGenerateCedarResponse = { + /** Response containing generated `.mega_cedar.json` content. */ + data?: { + content: string + } + err_message: string + req_result: boolean +} + export type CommonResultGroupResponse = { data?: { /** @format int64 */ @@ -4193,6 +4202,7 @@ export type CommonResultReviewersResponse = { export type CommonResultRunnerStatusResponse = { data?: { + domain?: string | null error?: string | null log_file?: string | null phase: string @@ -4255,6 +4265,7 @@ export type CommonResultSidebarRes = { export type CommonResultStartRunnerResponse = { data?: { + domain?: string | null phase: string vm_id: string } @@ -4860,7 +4871,7 @@ export type CreateTriggerRequest = { export type CreateWebhookRequest = { active?: boolean | null - /** Event types: "cl.created", "cl.updated", "cl.merged", "cl.closed", "cl.reopened", "cl.comment.created", "*" */ + /** Event types: "cl_created", "cl_updated", "cl_merged", "cl_closed", "cl_reopened", "cl_comment_created", "all" */ event_types: string[] path_filter?: string | null secret: string @@ -5011,6 +5022,16 @@ export type FilesChangedPage = { page: CommonPageClFilesChangedItemSchema } +/** Request body for generating `.mega_cedar.json` content from admin usernames. */ +export type GenerateCedarRequest = { + admins: string[] +} + +/** Response containing generated `.mega_cedar.json` content. */ +export type GenerateCedarResponse = { + content: string +} + export type GpgKey = { /** @format date-time */ created_at: string @@ -5723,7 +5744,7 @@ export type StartRunnerRequest = { image_memory_mb?: number | null image_path?: string | null image_url?: string | null - /** Force recreate when a Running VM already exists for this domain */ + /** Force recreate when a Running VM already exists for this mono's domain. */ replace?: boolean target?: string | null } @@ -7339,6 +7360,8 @@ export type PostThreadsV2Data = V2MessageThread export type PostSignInFigmaData = FigmaKeyPair +export type PostApiAdminCedarGenerateData = CommonResultGenerateCedarResponse + export type PostApiAdminGroupsData = CommonResultGroupResponse export type PostApiAdminGroupsListData = CommonResultCommonPageGroupResponse @@ -16237,6 +16260,31 @@ supporting either retrieving the entire log at once or segmenting it by line cou } } v1 = { + /** + * @description Generate `.mega_cedar.json` content from a list of admin usernames. Only admins can access this endpoint. Does not write to the repository. + * + * @tags User Management + * @name PostApiAdminCedarGenerate + * @summary POST /api/v1/admin/cedar/generate + * @request POST:/api/v1/admin/cedar/generate + */ + postApiAdminCedarGenerate: () => { + const base = 'POST:/api/v1/admin/cedar/generate' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: () => dataTaggedQueryKey([base]), + request: (data: GenerateCedarRequest, params: RequestParams = {}) => + this.request({ + path: `/api/v1/admin/cedar/generate`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params + }) + } + }, + /** * No description * diff --git a/saturn/Cargo.toml b/saturn/Cargo.toml index f09e64ec8..4e8425395 100644 --- a/saturn/Cargo.toml +++ b/saturn/Cargo.toml @@ -17,4 +17,3 @@ thiserror = { workspace = true } cedar-policy = { workspace = true } itertools = { workspace = true } regex = { workspace = true } -lazy_static = { workspace = true } diff --git a/saturn/src/reviewer_parser.rs b/saturn/src/reviewer_parser.rs index a198bcdff..f46620bf7 100644 --- a/saturn/src/reviewer_parser.rs +++ b/saturn/src/reviewer_parser.rs @@ -7,17 +7,20 @@ //! to ["alice", "bob"]; //! ``` -use std::collections::{HashMap, HashSet}; +use std::{ + collections::{HashMap, HashSet}, + sync::LazyLock, +}; -use lazy_static::lazy_static; use regex::Regex; -lazy_static! { - static ref RULE_PATTERN: Regex = Regex::new( - r#"(?s)permit\s*\([^)]*\)\s*when\s*\{\s*resource\.path\.startsWith\s*\(\s*"([^"]*)"\s*\)\s*\}\s*to\s*\[([^\]]+)\]"# - ).unwrap(); - static ref REVIEWER_PATTERN: Regex = Regex::new(r#""([^"]+)""#).unwrap(); -} +static RULE_PATTERN: LazyLock = LazyLock::new(|| { + Regex::new( + r#"(?s)permit\s*\([^)]*\)\s*when\s*\{\s*resource\.path\.startsWith\s*\(\s*"([^"]*)"\s*\)\s*\}\s*to\s*\[([^\]]+)\]"#, + ) + .unwrap() +}); +static REVIEWER_PATTERN: LazyLock = LazyLock::new(|| Regex::new(r#""([^"]+)""#).unwrap()); /// Represents a reviewer rule extracted from policy file #[derive(Debug, Clone, PartialEq)]