From 24323e17b26b3a72e75c76b02963c151bce373d7 Mon Sep 17 00:00:00 2001 From: Carlrs Date: Wed, 7 Jun 2023 10:54:40 +0000 Subject: [PATCH] update diesel to 2.1.0 and diesel-async to 0.3.0 (issue #2882) (#2895) * update diesel to 2.1.0 and diesel-async to 0.3.0 (issue #2882) * get rid of deprecated RawValue type alias usage, explicitly import diesel types instead of using wildcard import * Update diesel-derive-enum and diesel-derive-newtype libraries * Revert manual changes to schema.rs * Update to newer diesel-cli image in CI, run fix-clippy before schema comparison, update schema to one generated with diesel-cli 2.1.0 and clippyfixed * Remove wildcard import lint, fix diesel schema pipeline --------- Co-authored-by: Dessalines --- .woodpecker.yml | 6 +- Cargo.lock | 508 +++++++++++++++++++-------------- Cargo.toml | 10 +- crates/db_schema/src/schema.rs | 37 ++- crates/db_schema/src/utils.rs | 2 +- 5 files changed, 336 insertions(+), 227 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index ae1925a2..999604f6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -79,8 +79,8 @@ pipeline: -D clippy::style -D clippy::correctness -D clippy::suspicious -D clippy::dbg_macro -D clippy::inefficient_to_string -D clippy::items-after-statements -D clippy::implicit_clone - -D clippy::wildcard_imports -D clippy::cast_lossless - -D clippy::manual_string_new -D clippy::redundant_closure_for_method_calls + -D clippy::cast_lossless -D clippy::manual_string_new + -D clippy::redundant_closure_for_method_calls -D clippy::unused_self -A clippy::uninlined_format_args -D clippy::get_first @@ -111,7 +111,7 @@ pipeline: # platform: linux/amd64 check_diesel_schema: - image: jameshiew/diesel-cli + image: willsquire/diesel-cli environment: CARGO_HOME: .cargo DATABASE_URL: postgres://lemmy:password@database:5432/lemmy diff --git a/Cargo.lock b/Cargo.lock index 17d85485..881efdcd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,7 +67,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytes", "futures-core", "futures-sink", @@ -122,7 +122,7 @@ dependencies = [ "actix-utils", "ahash", "base64", - "bitflags", + "bitflags 1.3.2", "bytes", "bytestring", "derive_more", @@ -150,7 +150,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ - "quote 1.0.21", + "quote", "syn 1.0.103", ] @@ -303,8 +303,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13" dependencies = [ "actix-router", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -382,8 +382,8 @@ checksum = "70151a5226578411132d798aa248df45b30aa34aea2e580628870b4d87be717b" dependencies = [ "darling 0.13.4", "pmutil", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "swc_macros_common", "syn 1.0.103", ] @@ -413,20 +413,20 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] [[package]] name = "async-trait" -version = "0.1.58" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.103", + "proc-macro2", + "quote", + "syn 2.0.18", ] [[package]] @@ -490,7 +490,7 @@ checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "http", @@ -646,6 +646,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" + [[package]] name = "bitvec" version = "0.19.6" @@ -774,7 +780,7 @@ version = "4.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7db700bc935f9e43e88d00b0850dae18a63773cfbec6d8e070fccf7fef89a39" dependencies = [ - "bitflags", + "bitflags 1.3.2", "clap_derive", "clap_lex", "is-terminal", @@ -791,8 +797,8 @@ checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" dependencies = [ "heck 0.4.0", "proc-macro-error", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -900,7 +906,7 @@ dependencies = [ "rust-ini", "serde", "serde_json", - "toml", + "toml 0.5.9", "yaml-rust", ] @@ -1060,8 +1066,8 @@ dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "scratch", "syn 1.0.103", ] @@ -1078,8 +1084,8 @@ version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -1121,8 +1127,8 @@ checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "strsim", "syn 1.0.103", ] @@ -1135,8 +1141,8 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "strsim", "syn 1.0.103", ] @@ -1149,8 +1155,8 @@ checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "strsim", "syn 1.0.103", ] @@ -1162,7 +1168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" dependencies = [ "darling_core 0.12.4", - "quote 1.0.21", + "quote", "syn 1.0.103", ] @@ -1173,7 +1179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core 0.13.4", - "quote 1.0.21", + "quote", "syn 1.0.103", ] @@ -1184,7 +1190,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" dependencies = [ "darling_core 0.14.1", - "quote 1.0.21", + "quote", "syn 1.0.103", ] @@ -1272,8 +1278,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66e616858f6187ed828df7c64a6d71720d83767a7f19740b2d1b6fe6327b36e5" dependencies = [ "darling 0.12.4", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -1284,8 +1290,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ "darling 0.14.1", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -1316,8 +1322,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "rustc_version", "syn 1.0.103", ] @@ -1333,11 +1339,11 @@ dependencies = [ [[package]] name = "diesel" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68c186a7418a2aac330bb76cde82f16c36b03a66fb91db32d20214311f9f6545" +checksum = "f7a532c1f99a0f596f6960a60d1e119e91582b24b39e2d83a190e61262c3ef0c" dependencies = [ - "bitflags", + "bitflags 2.3.1", "byteorder", "chrono", "diesel_derives", @@ -1348,51 +1354,52 @@ dependencies = [ [[package]] name = "diesel-async" -version = "0.1.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588383fa6d12fb17edf0fda88942222bbad070d185b5dcc3ac4d8354ce84b583" +checksum = "10e214a94ce6f3a5835d5d09db34036fab0580cf9acec947c5ec77bf610569c2" dependencies = [ "async-trait", "deadpool", "diesel", - "futures", + "futures-util", + "scoped-futures", "tokio", "tokio-postgres", ] [[package]] name = "diesel-derive-enum" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b10c03b954333d05bfd5be1d8a74eae2c9ca77b86e0f1c3a1ea29c49da1d6c2" +checksum = "81c5131a2895ef64741dad1d483f358c2a229a3a2d1b256778cdc5e146db64d4" dependencies = [ "heck 0.4.0", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.103", + "proc-macro2", + "quote", + "syn 2.0.18", ] [[package]] name = "diesel-derive-newtype" -version = "2.0.0-rc.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd577654b63c049f4eecd2ce1187740a050166372673f6b09c351c53b575c34a" +checksum = "eb61575e838ea6cbc2b839ebe216e49894dfd7203bf411d1fedadbdca0950bb1" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.14.9", + "proc-macro2", + "quote", + "syn 2.0.18", ] [[package]] name = "diesel_derives" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b758c91dbc3fe1fdcb0dba5bd13276c6a66422f2ef5795b58488248a310aa" +checksum = "74398b79d81e52e130d991afeed9c86034bb1b7735f46d2f5bf7deb261d80303" dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.47", - "quote 1.0.21", - "syn 1.0.103", + "diesel_table_macro_syntax", + "proc-macro2", + "quote", + "syn 2.0.18", ] [[package]] @@ -1407,15 +1414,24 @@ dependencies = [ [[package]] name = "diesel_migrations" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ae22beef5e9d6fab9225ddb073c1c6c1a7a6ded5019d5da11d1e5c5adc34e2" +checksum = "6036b3f0120c5961381b570ee20a02432d7e2d27ea60de9578799cf9156914ac" dependencies = [ "diesel", "migrations_internals", "migrations_macros", ] +[[package]] +name = "diesel_table_macro_syntax" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" +dependencies = [ + "syn 2.0.18", +] + [[package]] name = "digest" version = "0.10.5" @@ -1462,8 +1478,8 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -1492,8 +1508,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "252ec56116f931b050b5d80512c2c76f4807a297dd95a93f37593dd7650868a5" dependencies = [ "darling 0.13.4", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -1653,8 +1669,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8ea75f31022cba043afe037940d73684327e915f88f62478e778c3de914cd0a" dependencies = [ "enum_delegate_lib", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -1664,8 +1680,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e1f6c3800b304a6be0012039e2a45a322a093539c45ab818d9e6895a39c90fe" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "rand 0.8.5", "syn 1.0.103", ] @@ -1677,7 +1693,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9895954c6ec59d897ed28a64815f2ceb57653fcaaebd317f2edc78b74f5495b6" dependencies = [ "pmutil", - "proc-macro2 1.0.47", + "proc-macro2", "swc_macros_common", "syn 1.0.103", ] @@ -1796,7 +1812,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d449976075322384507443937df2f1d5577afbf4282f12a5a66ef29fa3e6307" dependencies = [ "pmutil", - "proc-macro2 1.0.47", + "proc-macro2", "swc_macros_common", "syn 1.0.103", ] @@ -1881,8 +1897,8 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -2111,8 +2127,8 @@ dependencies = [ "log", "mac", "markup5ever 0.10.1", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -2125,8 +2141,8 @@ dependencies = [ "log", "mac", "markup5ever 0.11.0", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -2394,8 +2410,8 @@ checksum = "8a7d079e129b77477a49c5c4f1cfe9ce6c2c909ef52520693e8e811a714c7b20" dependencies = [ "Inflector", "pmutil", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -2814,7 +2830,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec", - "bitflags", + "bitflags 1.3.2", "cfg-if", "ryu", "static_assertions", @@ -3060,23 +3076,23 @@ dependencies = [ [[package]] name = "migrations_internals" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c493c09323068c01e54c685f7da41a9ccf9219735c3766fbfd6099806ea08fbc" +checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada" dependencies = [ "serde", - "toml", + "toml 0.7.4", ] [[package]] name = "migrations_macros" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8ff27a350511de30cdabb77147501c36ef02e0451d957abea2f30caffb2b58" +checksum = "cce3325ac70e67bbab5bd837a31cae01f1a6db64e0e744a33cb03a543469ef08" dependencies = [ "migrations_internals", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", ] [[package]] @@ -3282,7 +3298,7 @@ version = "0.10.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -3297,8 +3313,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -3588,8 +3604,8 @@ checksum = "f4f9272122f5979a6511a749af9db9bfc810393f63119970d7085fed1c4ea0db" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -3749,7 +3765,7 @@ dependencies = [ "time 0.3.15", "tokio", "tokio-util 0.7.4", - "toml", + "toml 0.5.9", "tracing", "tracing-actix-web 0.7.1", "tracing-awc", @@ -3777,8 +3793,8 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -3806,8 +3822,8 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3894e5d549cccbe44afecf72922f277f603cd4bb0219c8342631ef18fffbe004" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -3817,7 +3833,7 @@ version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "flate2", "miniz_oxide 0.5.4", @@ -3879,7 +3895,7 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" dependencies = [ - "proc-macro2 1.0.47", + "proc-macro2", "syn 1.0.103", ] @@ -3890,8 +3906,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", "version_check", ] @@ -3902,25 +3918,16 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "version_check", ] [[package]] name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "proc-macro2" -version = "1.0.47" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" dependencies = [ "unicode-ident", ] @@ -3995,8 +4002,8 @@ checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4008,8 +4015,8 @@ checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4065,20 +4072,11 @@ dependencies = [ [[package]] name = "quote" -version = "0.6.13" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" -dependencies = [ - "proc-macro2 1.0.47", + "proc-macro2", ] [[package]] @@ -4180,7 +4178,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4335,7 +4333,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" dependencies = [ "base64", - "bitflags", + "bitflags 1.3.2", "serde", ] @@ -4347,8 +4345,8 @@ checksum = "6f697b8b3f19bee20f30dc87213d05ce091c43bc733ab1bfc98b0e5cdd9943f3" dependencies = [ "convert_case", "lazy_static", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "regex", "tinyjson", ] @@ -4408,7 +4406,7 @@ version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -4478,6 +4476,16 @@ dependencies = [ "windows-sys 0.36.1", ] +[[package]] +name = "scoped-futures" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1473e24c637950c9bd38763220bea91ec3e095a89f672bbd7a10d03e77ba467" +dependencies = [ + "cfg-if", + "pin-utils", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -4512,7 +4520,7 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -4571,8 +4579,8 @@ version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4588,6 +4596,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -4617,8 +4634,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling 0.13.4", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4643,8 +4660,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b6f5d1c3087fb119617cff2966fe3808a80e5eb59a8c1601d5994d66f4346a5" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4749,8 +4766,8 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4810,8 +4827,8 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", ] [[package]] @@ -4821,8 +4838,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91f42363e5ca94ea6f3faee9e3b5e1a4047535ae323f5c0579385fb2ae95874e" dependencies = [ "pmutil", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "swc_macros_common", "syn 1.0.103", ] @@ -4856,8 +4873,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.0", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "rustversion", "syn 1.0.103", ] @@ -4915,7 +4932,7 @@ version = "0.94.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3303de79adce1137e6514e5939686173e7d26c71d91c3067056caa45183547" dependencies = [ - "bitflags", + "bitflags 1.3.2", "is-macro", "num-bigint", "scoped-tls", @@ -4952,8 +4969,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c20468634668c2bbab581947bb8c75c97158d5a6959f4ba33df20983b20b4f6" dependencies = [ "pmutil", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4964,8 +4981,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e582c3e3c2269238524923781df5be49e011dbe29cf7683a2215d600a562ea6" dependencies = [ "pmutil", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -4987,31 +5004,31 @@ checksum = "ebeed7eb0f545f48ad30f5aab314e5208b735bcea1d1464f26e20f06db904989" dependencies = [ "Inflector", "pmutil", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "swc_macros_common", "syn 1.0.103", ] [[package]] name = "syn" -version = "0.14.9" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "syn" -version = "1.0.103" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "unicode-ident", ] @@ -5094,8 +5111,8 @@ version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -5161,9 +5178,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.21.2" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes", @@ -5177,7 +5194,7 @@ dependencies = [ "socket2", "tokio-macros", "tracing", - "winapi", + "windows-sys 0.45.0", ] [[package]] @@ -5196,8 +5213,8 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -5294,6 +5311,40 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tonic" version = "0.6.2" @@ -5363,9 +5414,9 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" dependencies = [ - "proc-macro2 1.0.47", + "proc-macro2", "prost-build 0.9.0", - "quote 1.0.21", + "quote", "syn 1.0.103", ] @@ -5376,9 +5427,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ "prettyplease", - "proc-macro2 1.0.47", + "proc-macro2", "prost-build 0.11.4", - "quote 1.0.21", + "quote", "syn 1.0.103", ] @@ -5424,7 +5475,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytes", "futures-core", "futures-util", @@ -5494,8 +5545,8 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -5664,8 +5715,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f807fdb3151fee75df7485b901a89624358cd07a67a8fb1a5831bf5a07681ff" dependencies = [ "Inflector", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", "termcolor", ] @@ -5698,8 +5749,8 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89851716b67b937e393b3daa8423e67ddfc4bbbf1654bcf05488e95e0828db0c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", ] @@ -5769,12 +5820,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode_categories" version = "0.1.1" @@ -5912,8 +5957,8 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", "wasm-bindgen-shared", ] @@ -5936,7 +5981,7 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ - "quote 1.0.21", + "quote", "wasm-bindgen-macro-support", ] @@ -5946,8 +5991,8 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ - "proc-macro2 1.0.47", - "quote 1.0.21", + "proc-macro2", + "quote", "syn 1.0.103", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -6077,19 +6122,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" @@ -6099,9 +6168,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" @@ -6111,9 +6180,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" @@ -6123,9 +6192,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" @@ -6135,15 +6204,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" @@ -6153,9 +6222,18 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "winnow" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +dependencies = [ + "memchr", +] [[package]] name = "winreg" diff --git a/Cargo.toml b/Cargo.toml index eeeb9c32..f275ddbf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,9 +60,9 @@ lemmy_db_views = { version = "=0.17.1", path = "./crates/db_views" } lemmy_db_views_actor = { version = "=0.17.1", path = "./crates/db_views_actor" } lemmy_db_views_moderator = { version = "=0.17.1", path = "./crates/db_views_moderator" } activitypub_federation = { version = "0.4.0", default-features = false, features = ["actix-web"] } -diesel = "2.0.2" -diesel_migrations = "2.0.0" -diesel-async = "0.1.1" +diesel = "2.1.0" +diesel_migrations = "2.1.0" +diesel-async = "0.3.0" serde = { version = "1.0.147", features = ["derive"] } serde_with = "1.14.0" actix-web = { version = "4.2.1", default-features = false, features = ["macros", "rustls"] } @@ -93,8 +93,8 @@ tokio = "1.21.2" sha2 = "0.10.6" regex = "1.6.0" once_cell = "1.15.0" -diesel-derive-newtype = "2.0.0-rc.0" -diesel-derive-enum = {version = "2.0.1", features = ["postgres"] } +diesel-derive-newtype = "2.0.0" +diesel-derive-enum = {version = "2.1.0", features = ["postgres"] } strum = "0.24.1" strum_macros = "0.24.3" itertools = "0.10.5" diff --git a/crates/db_schema/src/schema.rs b/crates/db_schema/src/schema.rs index f2ccf5e2..2753a0d6 100644 --- a/crates/db_schema/src/schema.rs +++ b/crates/db_schema/src/schema.rs @@ -65,7 +65,7 @@ diesel::table! { } diesel::table! { - use diesel::sql_types::*; + use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar}; use diesel_ltree::sql_types::Ltree; comment (id) { @@ -77,6 +77,7 @@ diesel::table! { published -> Timestamp, updated -> Nullable, deleted -> Bool, + #[max_length = 255] ap_id -> Varchar, local -> Bool, path -> Ltree, @@ -144,7 +145,9 @@ diesel::table! { diesel::table! { community (id) { id -> Int4, + #[max_length = 255] name -> Varchar, + #[max_length = 255] title -> Varchar, description -> Nullable, removed -> Bool, @@ -152,6 +155,7 @@ diesel::table! { updated -> Nullable, deleted -> Bool, nsfw -> Bool, + #[max_length = 255] actor_id -> Varchar, local -> Bool, private_key -> Nullable, @@ -159,13 +163,18 @@ diesel::table! { last_refreshed_at -> Timestamp, icon -> Nullable, banner -> Nullable, + #[max_length = 255] followers_url -> Varchar, + #[max_length = 255] inbox_url -> Varchar, + #[max_length = 255] shared_inbox_url -> Nullable, hidden -> Bool, posting_restricted_to_mods -> Bool, instance_id -> Int4, + #[max_length = 255] moderators_url -> Nullable, + #[max_length = 255] featured_url -> Nullable, } } @@ -235,6 +244,7 @@ diesel::table! { custom_emoji (id) { id -> Int4, local_site_id -> Int4, + #[max_length = 128] shortcode -> Varchar, image_url -> Text, alt_text -> Text, @@ -248,6 +258,7 @@ diesel::table! { custom_emoji_keyword (id) { id -> Int4, custom_emoji_id -> Int4, + #[max_length = 128] keyword -> Varchar, } } @@ -283,10 +294,13 @@ diesel::table! { diesel::table! { instance (id) { id -> Int4, + #[max_length = 255] domain -> Varchar, published -> Timestamp, updated -> Nullable, + #[max_length = 255] software -> Nullable, + #[max_length = 255] version -> Nullable, } } @@ -294,13 +308,14 @@ diesel::table! { diesel::table! { language (id) { id -> Int4, + #[max_length = 3] code -> Varchar, name -> Text, } } diesel::table! { - use diesel::sql_types::*; + use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar}; use super::sql_types::ListingTypeEnum; use super::sql_types::RegistrationModeEnum; @@ -325,6 +340,7 @@ diesel::table! { federation_debug -> Bool, federation_worker_count -> Int4, captcha_enabled -> Bool, + #[max_length = 255] captcha_difficulty -> Varchar, published -> Timestamp, updated -> Nullable, @@ -355,7 +371,7 @@ diesel::table! { } diesel::table! { - use diesel::sql_types::*; + use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar}; use super::sql_types::SortTypeEnum; use super::sql_types::ListingTypeEnum; @@ -365,9 +381,11 @@ diesel::table! { password_encrypted -> Text, email -> Nullable, show_nsfw -> Bool, + #[max_length = 20] theme -> Varchar, default_sort_type -> SortTypeEnum, default_listing_type -> ListingTypeEnum, + #[max_length = 20] interface_language -> Varchar, show_avatars -> Bool, send_notifications_to_email -> Bool, @@ -525,12 +543,15 @@ diesel::table! { diesel::table! { person (id) { id -> Int4, + #[max_length = 255] name -> Varchar, + #[max_length = 255] display_name -> Nullable, avatar -> Nullable, banned -> Bool, published -> Timestamp, updated -> Nullable, + #[max_length = 255] actor_id -> Varchar, bio -> Nullable, local -> Bool, @@ -539,7 +560,9 @@ diesel::table! { last_refreshed_at -> Timestamp, banner -> Nullable, deleted -> Bool, + #[max_length = 255] inbox_url -> Varchar, + #[max_length = 255] shared_inbox_url -> Nullable, matrix_user_id -> Nullable, admin -> Bool, @@ -610,6 +633,7 @@ diesel::table! { diesel::table! { post (id) { id -> Int4, + #[max_length = 200] name -> Varchar, url -> Nullable, body -> Nullable, @@ -624,6 +648,7 @@ diesel::table! { embed_title -> Nullable, embed_description -> Nullable, thumbnail_url -> Nullable, + #[max_length = 255] ap_id -> Varchar, local -> Bool, embed_video_url -> Nullable, @@ -673,6 +698,7 @@ diesel::table! { id -> Int4, creator_id -> Int4, post_id -> Int4, + #[max_length = 200] original_post_name -> Varchar, original_post_url -> Nullable, original_post_body -> Nullable, @@ -703,6 +729,7 @@ diesel::table! { read -> Bool, published -> Timestamp, updated -> Nullable, + #[max_length = 255] ap_id -> Varchar, local -> Bool, } @@ -743,15 +770,19 @@ diesel::table! { diesel::table! { site (id) { id -> Int4, + #[max_length = 20] name -> Varchar, sidebar -> Nullable, published -> Timestamp, updated -> Nullable, icon -> Nullable, banner -> Nullable, + #[max_length = 150] description -> Nullable, + #[max_length = 255] actor_id -> Varchar, last_refreshed_at -> Timestamp, + #[max_length = 255] inbox_url -> Varchar, private_key -> Nullable, public_key -> Text, diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index acedab97..bba1d810 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -229,7 +229,7 @@ impl FromSql for DbUrl where String: FromSql, { - fn from_sql(value: diesel::backend::RawValue<'_, DB>) -> diesel::deserialize::Result { + fn from_sql(value: DB::RawValue<'_>) -> diesel::deserialize::Result { let str = String::from_sql(value)?; Ok(DbUrl(Box::new(Url::parse(&str)?))) } -- 2.44.1