function upgrade($prev_version) { global $tablelist, $tables, $indexes, $records, $installer, $db, $prefix; foreach ($tables as $table => $columns) { db_check::table_structure($table, $columns, $indexes[$table]); } if (is_array($records) && !empty($records)) { foreach ($records as $table => $content) { db_check::table_data($table, $content); } } return true; }
function upgrade($prev_version) { global $tablelist, $tables, $indexes, $records; # add your staff here # do not touch belove here foreach ($tables as $table => $columns) { db_check::table_structure($table, $columns, $indexes[$table]); } if (is_array($records) && !empty($records)) { foreach ($records as $table => $content) { db_check::table_data($table, $content); } } return true; }
public function upgrade($prev_version) { global $installer, $db, $tablelist, $tables, $indexes, $records, $table_ids; if (!$this->pre_upgrade($prev_version) || !$installer->install()) { return false; } $tablelist = $db->list_tables(); foreach ($tables as $table => $columns) { db_check::table_structure($table, $columns, $indexes[$table]); } if (is_array($records) && !empty($records)) { foreach ($records as $table => $content) { db_check::table_data($table, $content); } } return $this->post_upgrade($prev_version); }