DbPatch_Core_Db::import PHP Method

import() public method

Import a SQL file
public import ( string $filename ) : boolean
$filename string
return boolean
    public function import($filename)
    {
        $commandLine = $this->getCliCommand($this->config->import_command, $filename);
        $retval = exec($commandLine, $result, $return);
        if ($retval === false || $return != 0) {
            throw new DbPatch_Exception('Error importing file ' . $filename . "\n" . $commandLine . "\n" . implode(PHP_EOL, $result));
        }
        return true;
    }