From 90dea1e3ecb3369820739ded2c8088004ce232e8 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sun, 10 Mar 2024 12:16:50 +0100 Subject: [PATCH] create matview only if does not exist --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index e1fc18b3b..078314ab9 100644 --- a/justfile +++ b/justfile @@ -46,7 +46,7 @@ schema-import: _confirm-drop _schema-import (alembic "upgrade" "head") _create-s # creates the `swdd_vv` materialized view (→ `swdd.swdd_vv`) _create-swdd-view: - psql -wb postgres://postgres@127.0.0.1:55432/pycroft -c 'create materialized view swdd_vv as \ + psql -wb postgres://postgres@127.0.0.1:55432/pycroft -c 'create materialized view if not exists swdd_vv as \ SELECT swdd_vv.persvv_id, \ swdd_vv.person_id, \ swdd_vv.vo_suchname, \