function domain_schema in Domain Access 6.2
Same name and namespace in other branches
- 7.3 domain.install \domain_schema()
- 7.2 domain.install \domain_schema()
Implement hook_schema()
1 call to domain_schema()
- domain_update_6200 in ./
domain.install - Updates to 6.x.2.
File
- ./
domain.install, line 36 - Install file.
Code
function domain_schema() {
$schema['domain'] = array(
'fields' => array(
'domain_id' => array(
'type' => 'serial',
'not null' => TRUE,
),
'subdomain' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'sitename' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'scheme' => array(
'type' => 'varchar',
'length' => '8',
'not null' => TRUE,
'default' => 'http',
),
'valid' => array(
'type' => 'varchar',
'length' => '1',
'not null' => TRUE,
'default' => '1',
),
),
'primary key' => array(
'domain_id',
),
'indexes' => array(
'subdomain' => array(
'subdomain',
),
),
);
$schema['domain_access'] = array(
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'gid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'realm' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'nid',
'gid',
'realm',
),
'indexes' => array(
'nid' => array(
'nid',
),
),
);
$schema['domain_editor'] = array(
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'domain_id' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'uid',
'domain_id',
),
);
return $schema;
}