UpdateDatabase.php
authorAlan Knowles <alan@akbkhome.com>
Wed, 9 May 2012 08:59:55 +0000 (16:59 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 9 May 2012 08:59:55 +0000 (16:59 +0800)
UpdateDatabase.php

index b97114a..25656e3 100644 (file)
@@ -197,6 +197,31 @@ class Pman_Core_UpdateDatabase extends Pman
                     unlink($fn);
                 }
             }
+            
+            
+            
+            $fd = $this->rootDir. "/Pman/$m/sql";
+            
+            foreach(glob($fd.'/*.sql') as $bfn) {
+                $fn =  $this->convertToPG($bfn);
+                
+                $cmd = "$psql_cmd -f < " . escapeshellarg($fn) ;
+                echo $cmd. ($this->cli ? "\n" : "<BR>\n");
+                passthru($cmd);
+            }
+            $fd = $this->rootDir. "/Pman/$m/mysql";
+            
+            foreach(glob($fd.'/*.sql') as $fn) {
+                $cmd = "$psql_cmd -f < " . escapeshellarg($fn) ;
+                echo $cmd. ($this->cli ? "\n" : "<BR>\n");
+                passthru($cmd);
+            }
+            
+            
+            
+            
+            
+            
         }
         
     }