function gdpr_consent_schema in GDPR Consent 7
Implements hook_schema().
File
- ./
gdpr_consent.install, line 11 - Installation and update functions for the Consent module.
Code
function gdpr_consent_schema() {
$schema['gdpr_consent_conditions'] = array(
'fields' => array(
'tc_id' => array(
'type' => 'serial',
'unsigned' => FALSE,
'not null' => TRUE,
),
'version' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'revision' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'language' => array(
'description' => '',
'type' => 'varchar',
'length' => '12',
'not null' => TRUE,
'default' => '',
),
'conditions' => array(
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'data_details' => array(
'type' => 'text',
'size' => 'big',
'not null' => FALSE,
),
'date' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'changes' => array(
'type' => 'text',
),
'format' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => 255,
),
'format_Details' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => 255,
),
),
'primary key' => array(
'tc_id',
),
);
$schema['gdpr_consent_accepted'] = array(
'fields' => array(
'gdpr_consent_id' => array(
'type' => 'serial',
'unsigned' => FALSE,
'not null' => TRUE,
),
'version' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'revision' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'language' => array(
'description' => '',
'type' => 'varchar',
'length' => '12',
'not null' => TRUE,
'default' => '',
),
'uid' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'accepted' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'revoked' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
'tc_id' => array(
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
),
'primary key' => array(
'gdpr_consent_id',
),
);
return $schema;
}