function hosting_package_schema in Hostmaster (Aegir) 6
Implementation of hook_schema().
File
- modules/
hosting/ package/ hosting_package.install, line 10 - Install, update and uninstall for the package management module.
Code
function hosting_package_schema() {
$schema['hosting_package'] = array(
'fields' => array(
'vid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'package_type' => array(
'type' => 'varchar',
'length' => 16,
'not null' => TRUE,
'default' => '',
),
'short_name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'old_short_name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'description' => array(
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
),
'primary key' => array(
'vid',
),
'indexes' => array(
'hosting_package_nid_idx' => array(
'nid',
),
),
);
$schema['hosting_package_instance'] = array(
'fields' => array(
'iid' => array(
'type' => 'serial',
'not null' => TRUE,
),
'rid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'package_id' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'filename' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'schema_version' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'version' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'version_code' => array(
'type' => 'int',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'iid',
),
'indexes' => array(
'hosting_package_rid_idx' => array(
'rid',
),
'hosting_package_id_idx' => array(
'package_id',
),
),
);
$schema['hosting_package_languages'] = array(
'fields' => array(
'iid' => array(
'type' => 'int',
'not null' => TRUE,
),
'language' => array(
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
),
),
);
return $schema;
}