Skip to content

Commit a69ac10

Browse files
authored
diesel: Use column_sorting = name (#12053)
This ensures that the order in which migrations are applied does not change the order of this file.
1 parent 95215f8 commit a69ac10

File tree

3 files changed

+361
-354
lines changed

3 files changed

+361
-354
lines changed

crates/crates_io_database/src/schema.patch

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,47 @@
1111
}
1212

1313
diesel::table! {
14-
@@ -67,9 +65,9 @@
15-
/// (Automatically generated by Diesel.)
16-
revoked -> Bool,
14+
@@ -25,7 +23,7 @@
15+
/// (Automatically generated by Diesel.)
16+
api_tokens (id) {
1717
/// NULL or an array of crate scope patterns (see RFC #2947)
1818
- crate_scopes -> Nullable<Array<Nullable<Text>>>,
1919
+ crate_scopes -> Nullable<Array<Text>>,
20+
/// The `created_at` column of the `api_tokens` table.
21+
///
22+
/// Its SQL type is `Timestamptz`.
23+
@@ -33,7 +31,7 @@
24+
/// (Automatically generated by Diesel.)
25+
created_at -> Timestamptz,
2026
/// An array of endpoint scopes or NULL for the `legacy` endpoint scope (see RFC #2947)
2127
- endpoint_scopes -> Nullable<Array<Nullable<Text>>>,
2228
+ endpoint_scopes -> Nullable<Array<Text>>,
2329
/// The `expired_at` column of the `api_tokens` table.
2430
///
2531
/// Its SQL type is `Nullable<Timestamptz>`.
26-
@@ -175,12 +173,6 @@
32+
@@ -169,12 +167,6 @@
2733
///
2834
/// (Automatically generated by Diesel.)
29-
created_at -> Timestamptz,
35+
id -> Int4,
3036
- /// The `path` column of the `categories` table.
3137
- ///
3238
- /// Its SQL type is `Ltree`.
3339
- ///
3440
- /// (Automatically generated by Diesel.)
3541
- path -> Ltree,
36-
}
37-
}
38-
39-
@@ -483,7 +475,7 @@
42+
/// The `slug` column of the `categories` table.
43+
///
44+
/// Its SQL type is `Varchar`.
45+
@@ -477,7 +469,7 @@
4046
/// Its SQL type is `Array<Nullable<Text>>`.
4147
///
4248
/// (Automatically generated by Diesel.)
4349
- features -> Array<Nullable<Text>>,
4450
+ features -> Array<Text>,
45-
/// The `target` column of the `dependencies` table.
51+
/// The `id` column of the `dependencies` table.
4652
///
47-
/// Its SQL type is `Nullable<Varchar>`.
48-
@@ -710,6 +702,24 @@
53+
/// Its SQL type is `Int4`.
54+
@@ -722,6 +714,24 @@
4955
}
5056

5157
diesel::table! {
@@ -70,7 +76,7 @@
7076
/// Representation of the `reserved_crate_names` table.
7177
///
7278
/// (Automatically generated by Diesel.)
73-
@@ -1094,7 +1104,8 @@
79+
@@ -1130,7 +1140,8 @@
7480
diesel::joinable!(crate_downloads -> crates (crate_id));
7581
diesel::joinable!(crate_owner_invitations -> crates (crate_id));
7682
diesel::joinable!(crate_owners -> crates (crate_id));
@@ -80,15 +86,15 @@
8086
diesel::joinable!(crates_categories -> categories (category_id));
8187
diesel::joinable!(crates_categories -> crates (crate_id));
8288
diesel::joinable!(crates_keywords -> crates (crate_id));
83-
@@ -1110,6 +1121,7 @@
89+
@@ -1146,6 +1157,7 @@
8490
diesel::joinable!(publish_limit_buckets -> users (user_id));
8591
diesel::joinable!(publish_rate_overrides -> users (user_id));
8692
diesel::joinable!(readme_renderings -> versions (version_id));
8793
+diesel::joinable!(recent_crate_downloads -> crates (crate_id));
8894
diesel::joinable!(trustpub_configs_github -> crates (crate_id));
8995
diesel::joinable!(trustpub_configs_gitlab -> crates (crate_id));
9096
diesel::joinable!(version_downloads -> versions (version_id));
91-
@@ -1140,6 +1152,7 @@
97+
@@ -1178,6 +1190,7 @@
9298
publish_limit_buckets,
9399
publish_rate_overrides,
94100
readme_renderings,

0 commit comments

Comments
 (0)