Skip to content

Commit e421caa

Browse files
committed
Auto merge of #3612 - jtgeibel:drop-tsvector-from-db-export, r=pietroalbini
Drop crates.textsearchable_index_col from the export This column is postgres specific and is normally populated via a trigger. The trigger is now enabled during the import so that the column can be dropped from the export. This addresses part of what was raised in bullet point 2 of #2078. The large readme column remains because there could be people using that data, but the text search column is redundant. r? `@smarnach` cc `@kornelski`
2 parents 090d1c9 + 8fb7d30 commit e421caa

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: src/tasks/dump_db/dump-db.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ description = "public"
8282
homepage = "public"
8383
documentation = "public"
8484
readme = "public"
85-
textsearchable_index_col = "public"
85+
textsearchable_index_col = "private" # This Postgres specific and can be derived from exported data
8686
repository = "public"
8787
max_upload_size = "public"
8888

Diff for: src/tasks/dump_db/dump-import.sql.hbs

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ BEGIN;
1616
TRUNCATE "{{this.name}}" RESTART IDENTITY CASCADE;
1717
{{~/each}}
1818

19+
-- Enable this trigger so that `crates.textsearchable_index_col` can be excluded from the export
20+
ALTER TABLE "crates" ENABLE TRIGGER "trigger_crates_tsvector_update";
21+
1922
-- Import the CSV data.
2023
{{~#each tables}}
2124
\copy "{{this.name}}" ({{this.columns}}) FROM 'data/{{this.name}}.csv' WITH CSV HEADER

0 commit comments

Comments
 (0)