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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions crates/crates_io_database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ regular tables, so we have to manually add them to the schema file.
If you need to update the patch file, you can do so by following these steps:

1. prefix `patch_file = "src/schema.patch"` in `diesel.toml` with a `#` to comment it out.
2. use `diesel print-schema` and save the output to `src/schema.rs.orig`
3. use `patch -o src/schema.rs src/schema.rs.orig src/schema.patch` to apply the patch file and solve remaining issues in the `src/schema.rs` file
4. use `diff -Naur src/schema.rs.orig src/schema.rs` to generate the new content for the `src/schema.patch` file
5. enable the `patch_file` option in the `diesel.toml` file again.
2. use `diesel print-schema` and save the output to `src/schema.rs`
3. use `cp src/schema.rs src/schema.rs.orig` to create a backup of the original file
4. use `patch src/schema.rs src/schema.patch` to apply the patch file and solve remaining issues in the `src/schema.rs` file
5. use `diff -Naur --label original --label patched src/schema.rs.orig src/schema.rs` to generate the new content for the `src/schema.patch` file
6. enable the `patch_file` option in the `diesel.toml` file again.
4 changes: 2 additions & 2 deletions crates/crates_io_database/src/schema.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- crates/crates_io_database/schema.rs.orig 2024-03-04 10:34:35
+++ crates/crates_io_database/schema.rs 2024-03-04 10:33:35
--- original
+++ patched
@@ -21,9 +21,7 @@
/// The `pg_catalog.tsvector` SQL type
///
Expand Down