function hosting_server_update_6004 in Hosting 7.3
Same name and namespace in other branches
- 6.2 server/hosting_server.install \hosting_server_update_6004()
- 7.4 server/hosting_server.install \hosting_server_update_6004()
Implements hook_update_N().
Add the IP address table.
File
- server/hosting_server.install, line 188 
- Define the database schema and update functions for the hosting_server module.
Code
function hosting_server_update_6004() {
  $return = array();
  // create the table so we can rename it.
  // retarded, i know.
  $schema = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'ip_address' => array(
        'type' => 'text',
        'size' => 'small',
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'vid' => array(
        'vid',
      ),
    ),
  );
  db_create_table($return, 'hosting_server_ip', $schema);
  return $return;
}