diff options
author | Erik Johnston <erik@matrix.org> | 2019-04-09 14:36:40 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-04-09 14:39:18 +0100 |
commit | 50d2a3059db29e7c9c7ccc9b005cec8497827e4b (patch) | |
tree | aeb3ab97a46c588a0d83554c99c7d6865edc75a5 /synapse/storage | |
parent | Merge pull request #5030 from matrix-org/rav/rewrite_g_s_v_k (diff) | |
download | synapse-50d2a3059db29e7c9c7ccc9b005cec8497827e4b.tar.xz |
Fix schema upgrade when dropping tables
We need to drop tables in the correct order due to foreign table constraints (on `application_services`), otherwise the DROP TABLE command will fail. Introduced in #4992.
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/schema/delta/54/drop_legacy_tables.sql | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/54/drop_legacy_tables.sql b/synapse/storage/schema/delta/54/drop_legacy_tables.sql index ecca005d9b..dbbe682697 100644 --- a/synapse/storage/schema/delta/54/drop_legacy_tables.sql +++ b/synapse/storage/schema/delta/54/drop_legacy_tables.sql @@ -13,8 +13,10 @@ * limitations under the License. */ -DROP TABLE IF EXISTS application_services; +-- we need to do this first due to foreign constraints DROP TABLE IF EXISTS application_services_regex; + +DROP TABLE IF EXISTS application_services; DROP TABLE IF EXISTS transaction_id_to_pdu; DROP TABLE IF EXISTS stats_reporting; DROP TABLE IF EXISTS current_state_resets; |