From cd2ebfdf8baf67012d75bf1b778bd2334839ffad Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Wed, 11 Nov 2020 08:52:12 -0500 Subject: [PATCH] Set to NULL instead of DEFAULT Fixes #915 --- .../20201105A-add-cascade-system-relations.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/api/src/database/migrations/20201105A-add-cascade-system-relations.ts b/api/src/database/migrations/20201105A-add-cascade-system-relations.ts index 7b10795bdd..95582b39dd 100644 --- a/api/src/database/migrations/20201105A-add-cascade-system-relations.ts +++ b/api/src/database/migrations/20201105A-add-cascade-system-relations.ts @@ -7,7 +7,7 @@ const updates = [ { column: 'group', references: 'directus_fields.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, ], }, @@ -17,17 +17,17 @@ const updates = [ { column: 'folder', references: 'directus_folders.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, { column: 'uploaded_by', references: 'directus_users.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, { column: 'modified_by', references: 'directus_users.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, ], }, @@ -77,7 +77,7 @@ const updates = [ { column: 'parent', references: 'directus_revisions.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, ], }, @@ -97,17 +97,17 @@ const updates = [ { column: 'project_logo', references: 'directus_files.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, { column: 'public_foreground', references: 'directus_files.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, { column: 'public_background', references: 'directus_files.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, ], }, @@ -117,7 +117,7 @@ const updates = [ { column: 'role', references: 'directus_roles.id', - onDelete: 'SET DEFAULT', + onDelete: 'SET NULL', }, ], },