示例#1
0
 /**
  * Checks to see if the minion migrations table exists and attempts to
  * create it if it doesn't
  *
  * @return boolean
  */
 public function ensure_table_exists()
 {
     $table = $this->_db->table_prefix() . $this->_table;
     $query = $this->_db->query(\Gleez\Database\Database::SELECT, "SHOW TABLES like '" . $table . "'");
     if (!count($query)) {
         $sql = View::factory('minion/db/schema')->set('table_name', $table)->render();
         $this->_db->query(NULL, $sql);
     }
 }