Fix #6111 - set up basic infrastructure
[Pman.Core] / UpdateDatabase / MysqlEngineCharset.php
index 374e6d7..ba81c63 100644 (file)
@@ -13,10 +13,15 @@ class Pman_Core_UpdateDatabase_MysqlEngineCharset {
     
     function __construct()
     {
-          
+        // this might get run before we have imported the database
+        // and hence not have any db.
         $this->loadIniFiles(); //?? shared???
         
+       
         $dbo = DB_DataObject::factory('core_enum');
+        
+        
+       
         if (is_a($dbo, 'PDO_DataObject')) {
             
             $this->views = $dbo->generator()->introspection()->getListOf('views');
@@ -28,10 +33,9 @@ class Pman_Core_UpdateDatabase_MysqlEngineCharset {
         // update the engine first - get's around 1000 character limit on indexes..cd
         // however - Innodb does not support fulltext indexes, so this may fail...
         $this->updateEngine(); 
-        
         $this->updateCharacterSet();
-        
-        
+         
     }
     
     function loadIniFiles()
@@ -113,6 +117,7 @@ class Pman_Core_UpdateDatabase_MysqlEngineCharset {
     {
         $db = DB_DataObject::factory('core_enum');
         $db->query("show variables like 'innodb_file_per_table'");
+        
         $db->fetch();
         
         $pg = HTML_FlexyFramework::get()->page;
@@ -133,7 +138,7 @@ class Pman_Core_UpdateDatabase_MysqlEngineCharset {
         
         $views = $this->views;
         
-        
+         echo "a3\n";
         foreach (array_keys($this->schema) as $tbl){
             
             if(strpos($tbl, '__keys') !== false ){