function hosting_package_update_4 in Hosting 7.4
Same name and namespace in other branches
- 5 package/hosting_package.install \hosting_package_update_4()
- 6.2 package/hosting_package.install \hosting_package_update_4()
- 7.3 package/hosting_package.install \hosting_package_update_4()
Implements hook_update_N().
Package languages are associated to package instances, not packages
File
- package/
hosting_package.install, line 169 - Define database schema and update functions for the package management module.
Code
function hosting_package_update_4() {
include_once drupal_get_path('module', 'hosting_task') . '/hosting_task.module';
$ret = array();
$ret[] = update_sql("DROP TABLE {hosting_package_languages}");
$ret[] = update_sql("CREATE TABLE {hosting_package_languages} (\n iid int UNSIGNED NOT NULL,\n language VARCHAR(12) NOT NULL DEFAULT ''\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
// Re-verify all existing platforms
$result = db_query("SELECT nid FROM {node} WHERE type='platform' AND status=1");
while ($platform = db_fetch_object($result)) {
hosting_add_task($platform->nid, 'verify');
}
return $ret;
}