diff --git a/src/tasks/dump_db/dump-db.toml b/src/tasks/dump_db/dump-db.toml index 7cb89b77ce2..25d096a05bb 100644 --- a/src/tasks/dump_db/dump-db.toml +++ b/src/tasks/dump_db/dump-db.toml @@ -82,7 +82,7 @@ description = "public" homepage = "public" documentation = "public" readme = "public" -textsearchable_index_col = "public" +textsearchable_index_col = "private" # This Postgres specific and can be derived from exported data repository = "public" max_upload_size = "public" diff --git a/src/tasks/dump_db/dump-import.sql.hbs b/src/tasks/dump_db/dump-import.sql.hbs index 1d4f56b5ce1..f9c5ac5dd4b 100644 --- a/src/tasks/dump_db/dump-import.sql.hbs +++ b/src/tasks/dump_db/dump-import.sql.hbs @@ -16,6 +16,9 @@ BEGIN; TRUNCATE "{{this.name}}" RESTART IDENTITY CASCADE; {{~/each}} + -- Enable this trigger so that `crates.textsearchable_index_col` can be excluded from the export + ALTER TABLE "crates" ENABLE TRIGGER "trigger_crates_tsvector_update"; + -- Import the CSV data. {{~#each tables}} \copy "{{this.name}}" ({{this.columns}}) FROM 'data/{{this.name}}.csv' WITH CSV HEADER