summary refs log tree commit diff
path: root/scripts-dev/make_full_schema.sh
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-04-28 10:07:20 +0100
committerGitHub <noreply@github.com>2021-04-28 10:07:20 +0100
commita5575ea3cf5a16ae2cf57e812e27cd657f1d220f (patch)
tree8c2ae84631994082ddf3ae28af475a65e0bc68bd /scripts-dev/make_full_schema.sh
parentPort "Allow providing credentials to HTTPS_PROXY (#9657)" from mainline (#95) (diff)
parentRemove 3.6 old deps check (diff)
downloadsynapse-a5575ea3cf5a16ae2cf57e812e27cd657f1d220f.tar.xz
Merge pull request #97 from matrix-org/anoa/dinsic_release_1_31_0
Merge Synapse release v1.31.0 into dinsic
Diffstat (limited to 'scripts-dev/make_full_schema.sh')
-rwxr-xr-xscripts-dev/make_full_schema.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts-dev/make_full_schema.sh b/scripts-dev/make_full_schema.sh

index 60e8970a35..bc8f978660 100755 --- a/scripts-dev/make_full_schema.sh +++ b/scripts-dev/make_full_schema.sh
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script generates SQL files for creating a brand new Synapse DB with the latest # schema, on both SQLite3 and Postgres. @@ -162,12 +162,23 @@ else fi # Delete schema_version, applied_schema_deltas and applied_module_schemas tables +# Also delete any shadow tables from fts4 # This needs to be done after synapse_port_db is run echo "Dropping unwanted db tables..." SQL=" DROP TABLE schema_version; DROP TABLE applied_schema_deltas; DROP TABLE applied_module_schemas; +DROP TABLE event_search_content; +DROP TABLE event_search_segments; +DROP TABLE event_search_segdir; +DROP TABLE event_search_docsize; +DROP TABLE event_search_stat; +DROP TABLE user_directory_search_content; +DROP TABLE user_directory_search_segments; +DROP TABLE user_directory_search_segdir; +DROP TABLE user_directory_search_docsize; +DROP TABLE user_directory_search_stat; " sqlite3 "$SQLITE_DB" <<< "$SQL" psql $POSTGRES_DB_NAME -U "$POSTGRES_USERNAME" -w <<< "$SQL"