Exemplo n.º 1
0
 /**
  * Runs the already-built SQL for the system db (deletes the existing system tables)
  * 
  * @todo This is similar to system:build, fix this?
  * 
  * @param string $projectRoot 
  */
 protected function runSql($projectRoot)
 {
     $sqlDir = $projectRoot . Meshing_Utils::getPaths()->getPathSqlNodes() . '/' . $this->opts->name;
     $mapFile = $projectRoot . Meshing_Utils::getPaths()->getFileDbMap();
     $task = new Meshing_Propel_SqlRunner();
     $task->setSqlDir($sqlDir);
     $task->setMapFile($mapFile);
     // Set build properties (@todo switch this to use setPropelConnection)
     $task->addProperty('propel.database', $this->connection->getAdaptor());
     $task->addProperty('propel.database.url', $this->connection->getCalculatedDsn());
     $task->addProperty('propel.database.user', $this->connection->getUsername());
     $task->addProperty('propel.database.password', $this->connection->getPassword());
     $task->run();
 }