You are here

function hosting_client_update_2 in Hosting 7.4

Same name and namespace in other branches
  1. 5 client/hosting_client.install \hosting_client_update_2()
  2. 6.2 client/hosting_client.install \hosting_client_update_2()
  3. 7.3 client/hosting_client.install \hosting_client_update_2()

Implements hook_update_N().

Create the hosting_client_user relationship table

File

client/hosting_client.install, line 136
Define database schema, install and update functions for the hosting_client module.

Code

function hosting_client_update_2() {
  $ret = array();
  $ret[] = update_sql("CREATE TABLE {hosting_client_user} (\n         user int(10) unsigned NOT NULL default '0',\n         client int(10) unsigned NOT NULL default '0',\n         PRIMARY KEY (user)\n       ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");

  // Insert the uid 1 user into the admin client record.
  $ret[] = update_sql("INSERT INTO {hosting_client_user} VALUES (1, 1)");
  node_access_rebuild();
  return $ret;
}