You are here

function hosting_package_update_4 in Hostmaster (Aegir) 6

Package languages are associated to package instances, not packages

File

modules/hosting/package/hosting_package.install, line 162
Install, update and uninstall 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;
}