From 33a78df23edcdde4a56da72efec049735c008f07 Mon Sep 17 00:00:00 2001
From: Bartek Wrona <wrona@syncad.com>
Date: Fri, 17 Jul 2020 03:37:10 +0200
Subject: [PATCH] Fixed drop query to avoid error when view does not exist yet

---
 hive/db/schema.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hive/db/schema.py b/hive/db/schema.py
index b977e4aaa..17cd773ea 100644
--- a/hive/db/schema.py
+++ b/hive/db/schema.py
@@ -585,7 +585,7 @@ def setup(db):
     db.query_no_return(sql)
 
     sql = """
-        DROP VIEW public.vw_hive_posts;
+        DROP VIEW IF EXISTS public.vw_hive_posts;
 
         CREATE OR REPLACE VIEW public.vw_hive_posts
           AS
-- 
GitLab