UpdateDatabase.php
authorAlan Knowles <alan@roojs.com>
Tue, 7 Oct 2014 06:05:36 +0000 (14:05 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 7 Oct 2014 06:05:36 +0000 (14:05 +0800)
UpdateDatabase.php

index 8983620..80f4c02 100644 (file)
@@ -229,95 +229,7 @@ class Pman_Core_UpdateDatabase extends Pman
     
     
     
-    
-    function importmysql($dburl)
-    {
-        
-        // hide stuff for web..
-        $ar = $this->modulesList();
-        
-         
-        
-        // old -- DAtaObjects/*.sql
-        
-        foreach($ar as $m) {
-            
-            if (!empty($this->opts['only-module-sql']) && $m != $this->opts['only-module-sql']) {
-                continue;
-            }
-            
-            $fd = $this->rootDir. "/Pman/$m/DataObjects";
-            
-            $this->importmysqldir($dburl, $fd);
-            
-            // new -- sql directory..
-            // new style will not support migrate ... they have to go into mysql-migrate.... directories..
-            // new style will not support pg.sql etc.. naming - that's what the direcotries are for..
-            
-            $this->importmysqldir($dburl, $this->rootDir. "/Pman/$m/sql");
-            $this->importmysqldir($dburl, $this->rootDir. "/Pman/$m/mysql");
-              
-            
-        }
-        
-        
-        
-    }
-    /**
-     * postgresql import..
-     */
-    function importpgsql($dburl)
-    {
-        
-        // hide stuff for web..
-        
-        
-       
-        
-        $ar = $this->modulesList();
-       
-        print_R($ar);
-        foreach($ar as $m) {
-             echo "Importing SQL from module $m\n";
-            if (!empty($this->opts['only-module-sql']) && $m != $this->opts['only-module-sql']) {
-                continue;
-            }
-            echo "Importing SQL from module $m\n";
-            // if init has been called
-            // look in pgsql.ini
-            if (!empty($this->opts['init'])) {
-                $this->importpgsqldir($dburl, $this->rootDir. "/Pman/$m/pgsql.init");
-                
-            }
-            
-            
-            
-            $fd = $this->rootDir. "/Pman/$m/DataObjects";
-            
-            $this->importpgsqldir($dburl, $fd);
-            
-            // new -- sql directory..
-            // new style will not support migrate ... they have to go into mysql-migrate.... directories..
-            // new style will not support pg.sql etc.. naming - that's what the direcotries are for..
-            
-            $this->importpgsqldir($dburl, $this->rootDir. "/Pman/$m/sql");
-            $this->importpgsqldir($dburl, $this->rootDir. "/Pman/$m/pgsql");
-            
-            
-            
-            if (!empty($this->opts['init']) && file_exists($this->rootDir. "/Pman/$m/pgsql.initdata")) {
-                HTML_FlexyFramework::get()->generateDataobjectsCache(true);
-                
-                $this->importpgsqldir($dburl, $this->rootDir. "/Pman/$m/pgsql.initdata");
-                $this->fixSequencesPgsql();
-                
-            }
-              
-            
-        }
-       
-          
-    }
+     
     /** -------------- code to handle importing a whole directory of files into the database  -------  **/