function popup_onload_schema in Popup On Load 7
Implements hook_schema().
File
- ./
popup_onload.install, line 11 - Install, update, and uninstall functions for the Popup On Load module.
Code
function popup_onload_schema() {
$schema = [];
$schema['popup_onload'] = [
'description' => 'The base table for popup entities.',
'fields' => [
'popup_id' => [
'description' => 'Primary Key: Identifier for a popup.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'bundle_type' => [
'description' => 'The type of the popup.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
],
'language' => [
'description' => 'The language of the popup.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
],
'name' => [
'description' => 'The name of the popup - a human-readable identifier.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'body' => [
'type' => 'text',
'not null' => FALSE,
'description' => 'The body of the popup.',
],
'format' => [
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'Format of the popup\'s body.',
],
'width' => [
'description' => 'The width of the popup.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'height' => [
'description' => 'The height of the popup.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'fixed_position' => [
'description' => 'Indicate whether the popup position is fixed in the browser.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
],
'active_popup' => [
'description' => 'Provide option to deactivate popup.',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
],
'cookie_lifetime_single' => [
'description' => 'Provide ability to set cookie lifetime for single popup',
'type' => 'int',
'not null' => FALSE,
'default' => NULL,
],
],
'primary key' => [
'popup_id',
],
'indexes' => [
'bundle_type' => [
'bundle_type',
],
],
];
return $schema;
}