diff --git a/panelizer.install b/panelizer.install index 0efe032..ddf0ce0 100644 --- a/panelizer.install +++ b/panelizer.install @@ -1315,7 +1315,7 @@ function panelizer_update_7303(&$sandbox) { $sandbox['max'] = db_query("SELECT COUNT(pd.did) FROM {panels_display} pd JOIN {panelizer_entity} p ON p.did = pd.did - WHERE pd.storage_type = ''")->fetchField(); + WHERE pd.storage_type IS NULL")->fetchField(); if (empty($sandbox['max'])) { return t('Nothing to be fixed in Panelizer update 7303.'); } @@ -1328,7 +1328,7 @@ function panelizer_update_7303(&$sandbox) { $result = db_query_range("SELECT pd.did, p.entity_type, p.entity_id, p.view_mode FROM {panels_display} pd JOIN {panelizer_entity} p ON p.did = pd.did - WHERE pd.storage_type = '' AND pd.did > :current_did + WHERE pd.storage_type IS NULL AND pd.did > :current_did ORDER BY pd.did ASC", 0, $limit, array( ':current_did' => $sandbox['current_did'], )); @@ -1437,3 +1437,11 @@ function panelizer_update_7306() { } } } + +/** + * Rerun update 7303. Set the storage type and ID on existing + * {panelizer_entity} records. + */ +function panelizer_update_7307(&$sandbox) { + return panelizer_update_7303($sandbox); +}