protected function runSql($file, $message, $notFoundMessage, $output)
    {
        if (! is_file($file)) {
            $output->writeln($notFoundMessage);

            return;
        }

        $output->writeln($message);

        $dataSql = file_get_contents($file);

        // Split the sql file on new lines and insert into the database one line at a time
        foreach (preg_split('/;\s*\n/', $dataSql) as $command) {
            try {
                $query = $this->db->query($command, DbAdapter::QUERY_MODE_EXECUTE);
            } catch (Database_Exception $e) {
                if ($e->getCode() !== 1065) { // empty query
                    throw $e;
                }
            }
        }
    }