Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
[BUGFIX] Reorder SQL queries in EM upgrade script to report changed rows
Browse files Browse the repository at this point in the history
Make the actual migration come *last* so that `sql_affected_rows` correctly reports the number of rows that were changed.
  • Loading branch information
NamelessCoder committed Mar 3, 2015
1 parent f51188a commit 53e7b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class.ext_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public function access() {
* @return string
*/
public function main() {
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_content', 'CType = \'fed_fce\'', array('CType' => 'fluidcontent_content'));
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_reflection');
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_reflection_tags');
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_object');
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_object_tags');
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_content', 'CType = \'fed_fce\'', array('CType' => 'fluidcontent_content'));
return $GLOBALS['TYPO3_DB']->sql_affected_rows() . ' rows have been updated';
}
}

0 comments on commit 53e7b95

Please sign in to comment.