From fbc4379d67c8d2dd5802a4b3fca30b8ca638fb47 Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Wed, 28 Feb 2024 09:14:16 -0800 Subject: [PATCH] Add update hook to delete the entities --- stanford_profile.install | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/stanford_profile.install b/stanford_profile.install index 62ea899f4..7341224e9 100644 --- a/stanford_profile.install +++ b/stanford_profile.install @@ -629,3 +629,22 @@ function stanford_profile_update_9104() { $system_theme->set('admin', 'stanford_profile_admin_theme')->save(); } } + +/** + * Remove data for paragraph rows. + */ +function stanford_profile_update_9105(){ + $tables = [ + 'paragraph_row__su_page_components', + 'paragraph_row__su_pubs_components', + 'paragraph_row_revision__su_page_components', + 'paragraph_row_revision__su_pubs_components', + 'paragraph_rows_field_revision', + 'paragraph_rows_item', + 'paragraph_rows_item_field_data', + 'paragraph_rows_revision', + ]; + foreach ($tables as $table) { + \Drupal::database()->truncate($table)->execute(); + } +}