$this->loadIniFiles();
$this->updateTableComments();
+
+ $this->updateCharacterSet();
+
$ff = HTML_FlexyFramework::get();
if (!empty($ff->Pman['enable_trigger_tests'])) {
$err = substr("Failed Delete {$target_table} refs {$source_table}:{$source_col}", 0, 64);
$trigger .="
SET mid = 0;
- IF OLD.id > 0 THEN
+ IF OLD.{$target_col} > 0 THEN
SELECT count(*) into mid FROM {$source_table} WHERE {$source_col} = OLD.{$target_col} LIMIT 1;
IF mid > 0 THEN
UPDATE `$err` SET x = 1;
return $ret;
}
+ function updateCharacterSet()
+ {
+ DB_DataObject::debugLevel(1);
+ foreach (array_keys($this->schema) as $tbl){
+
+ if(strpos($tbl, '__keys') !== false ){
+ continue;
+ }
+
+ echo "CALL mysql_change_charset('{$tbl}') \n";
+ DB_DataObject::factory('core_enum')->query("CALL mysql_change_charset('{$tbl}')");
+ }
+ }
}