function webform_localization_schema in Webform Localization 7.4
Same name and namespace in other branches
- 7 webform_localization.install \webform_localization_schema()
Implements hook_schema().
File
- ./
webform_localization.install, line 38 - Webform Localization module install/schema hooks.
Code
function webform_localization_schema() {
$schema = array();
$schema['webform_localization'] = array(
'description' => 'Table for storing additional properties for webform localization.',
'fields' => array(
'nid' => array(
'description' => 'The node identifier of a webform.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'expose_strings' => array(
'description' => 'Boolean value of a webform for expose component strings for translation or not.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'single_webform' => array(
'description' => 'A Tanslation set Id for keep one single webform across a translation set.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'webform_properties' => array(
'description' => 'Webform properties to be sync.',
'type' => 'text',
'not null' => TRUE,
),
'sync_components' => array(
'description' => 'Boolean value for whether the webform components must be sync across translated nodes.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'sync_roles' => array(
'description' => 'Boolean value for whether the webform submission access roles must be sync across translated nodes.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'sync_emails' => array(
'description' => 'Boolean value for whether the webform emails must be sync across translated nodes.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'nid',
),
);
$schema['webform_component_localization'] = array(
'description' => 'Stores information about components properties sync for webform localization.',
'fields' => array(
'nid' => array(
'description' => 'The node identifier of a webform.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => 'The identifier for this component within this node, starts at 0 for each node.',
'type' => 'int',
'size' => 'small',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'standar_properties' => array(
'description' => 'Standar properties of this component to be sync.',
'type' => 'text',
'not null' => TRUE,
),
'extra_properties' => array(
'description' => 'Additional properties of this component to be sync.',
'type' => 'text',
'not null' => TRUE,
),
),
);
return $schema;
}