From 0976f1947b77edbb30a331b10c1d36a00352aa06 Mon Sep 17 00:00:00 2001 From: Warren He Date: Tue, 27 Jun 2023 14:28:27 -0700 Subject: [PATCH] storage: drop pg_trgm on wipe --- storage/postgres/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/postgres/client.go b/storage/postgres/client.go index b8f861ebe..77ea2099c 100644 --- a/storage/postgres/client.go +++ b/storage/postgres/client.go @@ -309,6 +309,10 @@ func (c *Client) listNexusMaterializedViews(ctx context.Context) ([]string, erro // Wipe removes all contents of the database. func (c *Client) Wipe(ctx context.Context) error { + if _, err := c.pool.Exec(ctx, "DROP EXTENSION IF EXISTS pg_trgm CASCADE;"); err != nil { + return err + } + tables, err := c.listNexusTables(ctx) if err != nil { return err