diff --git a/dbrepo-metadata-db/1_setup-schema.sql b/dbrepo-metadata-db/1_setup-schema.sql
index db90e94c1fa7989b390f09ba8d2bc78fd92c2fdd..34ccd4304f6d7354788ccb5eff7a9752645cb928 100644
--- a/dbrepo-metadata-db/1_setup-schema.sql
+++ b/dbrepo-metadata-db/1_setup-schema.sql
@@ -372,7 +372,7 @@ CREATE TABLE IF NOT EXISTS `mdb_view_columns`
     auto_generated   BOOLEAN                  DEFAULT false,
     is_null_allowed  BOOLEAN         NOT NULL DEFAULT true,
     PRIMARY KEY (id),
-    FOREIGN KEY (view_id) REFERENCES mdb_view (id)
+    FOREIGN KEY (view_id) REFERENCES mdb_view (id) ON DELETE CASCADE
 ) WITH SYSTEM VERSIONING;
 
 CREATE TABLE IF NOT EXISTS `mdb_identifiers`
diff --git a/helm/dbrepo/templates/metadata-configmap.yaml b/helm/dbrepo/templates/metadata-configmap.yaml
index c5d93fc4a1673877e5aa48e251aea3e53591a2ed..893f255627c17b9ddf0a3ad765527857b3f9982b 100644
--- a/helm/dbrepo/templates/metadata-configmap.yaml
+++ b/helm/dbrepo/templates/metadata-configmap.yaml
@@ -389,7 +389,7 @@ data:
         auto_generated   BOOLEAN                  DEFAULT false,
         is_null_allowed  BOOLEAN         NOT NULL DEFAULT true,
         PRIMARY KEY (id),
-        FOREIGN KEY (view_id) REFERENCES mdb_view (id)
+        FOREIGN KEY (view_id) REFERENCES mdb_view (id) ON DELETE CASCADE
     ) WITH SYSTEM VERSIONING;
 
     CREATE TABLE IF NOT EXISTS `mdb_identifiers`