diff --git a/stacks/end-to-end-security/superset.yaml b/stacks/end-to-end-security/superset.yaml index f5ca1ff3..e1bb378f 100644 --- a/stacks/end-to-end-security/superset.yaml +++ b/stacks/end-to-end-security/superset.yaml @@ -46,6 +46,11 @@ spec: - bash - -c - | + if psql --host postgresql-superset --user postgres --csv -c "SELECT datname FROM pg_database where datname = 'superset' limit 1" | grep -q superset; then + # The flask app will do any necesary migrations. + echo "Skip restoring the DB as it already exists" + exit 0 + fi psql --host postgresql-superset --user postgres < /dump/postgres_superset_dump.sql env: - name: PGPASSWORD