Skip to content

Commit

Permalink
Add update hook to delete the entities
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Feb 28, 2024
1 parent 0a4c617 commit fbc4379
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions stanford_profile.install
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit fbc4379

Please sign in to comment.