You are here

function domain_update_7305 in Domain Access 7.3

Allow domains to be made exportable.

File

./domain.install, line 318
Install file.

Code

function domain_update_7305(&$sandbox) {
  if (db_table_exists('domain_export')) {
    return t('{domain_export} table exists.');
  }
  $schema = array(
    'description' => 'Stores canonical machine names for domains.',
    'fields' => array(
      'domain_id' => array(
        'type' => 'serial',
        'description' => 'Domain id. Automatic master key.',
      ),
      'machine_name' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
        'description' => 'The machine name for this domain.',
      ),
    ),
    'primary key' => array(
      'machine_name',
    ),
    'indexes' => array(
      'domain_id' => array(
        'domain_id',
      ),
    ),
  );
  db_create_table('domain_export', $schema);
  return t('{domain_export} table created.');
}