function wysiwyg_schema in Wysiwyg 6.2
Same name and namespace in other branches
- 6 wysiwyg.install \wysiwyg_schema()
- 7.2 wysiwyg.install \wysiwyg_schema()
Implementation of hook_schema().
File
- ./
wysiwyg.install, line 6
Code
function wysiwyg_schema() {
$schema['wysiwyg'] = array(
'description' => 'Stores Wysiwyg profiles.',
'fields' => array(
'format' => array(
'description' => 'The {filter_formats}.format of the text format.',
'type' => 'int',
// Primary keys are implicitly not null.
'not null' => TRUE,
'default' => 0,
),
'editor' => array(
'description' => 'Internal name of the editor attached to the text format.',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'settings' => array(
'description' => 'Configuration settings for the editor.',
'type' => 'text',
'size' => 'normal',
'serialize' => TRUE,
),
),
'primary key' => array(
'format',
),
'foreign keys' => array(
'format' => array(
'table' => 'filter_formats',
'columns' => array(
'format' => 'format',
),
),
),
);
$schema['wysiwyg_user'] = array(
'description' => 'Stores user preferences for wysiwyg profiles.',
'fields' => array(
'uid' => array(
'description' => 'The {users}.uid of the user.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'format' => array(
'description' => 'The {filter_formats}.format of the text format.',
'type' => 'int',
'not null' => TRUE,
),
'status' => array(
'description' => 'Boolean indicating whether the format is enabled by default.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
),
'primary key' => array(
'uid',
'format',
),
'indexes' => array(
'format' => array(
'format',
),
),
'foreign keys' => array(
'uid' => array(
'table' => 'users',
'columns' => array(
'uid' => 'uid',
),
),
'format' => array(
'table' => 'filter_formats',
'columns' => array(
'format' => 'format',
),
),
),
);
return $schema;
}