/fuel/app/classes/upgrader.php
class Upgrader {
private $db = NULL;
private $run = array (
'option',
#'department',
#'location',
#'status',
#'role',
#'brand',
#'item',
#'category',
#'issue',
#'user'
);
public function __construct() {
$this->$db = \Fuel\Core\Database_MySQL::instance('migrate');
\DB::query('TRUNCATE TABLE `mappers`')->execute();
foreach ($this->run as $run) {
$method = "down_{$run}";
echo "Calling {$method}";
$this->{$method}();
$method = "up_{$run}";
echo "Calling {$method}";
$this->{$method}();
echo "Table/Module: {$run} migrated";
echo "----";
}
}
private function query($sql) {
return $this->db->query(1, $sql, NULL);
}
}
Mior-Muhammad-Zakis-MacBook-Pro:mobife crynobone$ php oil refine aduit:upgrade PHP Fatal error: Cannot redeclare class Fuel\Core\Database in /Users/crynobone/Sites/mobife/fuel/core/classes/database.php on line 18 Compile Error - Cannot redeclare class Fuel\Core\Database in COREPATH/classes/database.php on line 18
private function query($sql) {
return \DB::query($sql)->execute('migrate');
}
It looks like you're new here. If you want to get involved, click one of these buttons!