function party_simplenews_schema in Party 8.2
Implements hook_schema()
File
- modules/
party_simplenews/ party_simplenews.install, line 9 - Install information for Party Simplenews module
Code
function party_simplenews_schema() {
$schema['party_simplenews_subscriber'] = array(
'description' => 'A table of party ids to subscriber ids',
'fields' => array(
'snid' => array(
'description' => 'Primary key: Unique subscriber ID.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'party_id' => array(
'description' => 'The {party}.pid that has the same email address.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'party_field_ref' => array(
'description' => 'The reference of the field on the party this refers to. Of the form DATA_SET_NAME__ENTITY_ID__FIELD_NAME__DELTA',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'snid',
),
'indexes' => array(
'party_mail' => array(
'party_id',
'party_field_ref',
),
),
'foreign keys' => array(
'party_id' => array(
'table' => 'party',
'columns' => array(
'party_id' => 'pid',
),
),
),
);
$schema['party_subscription_settings'] = array(
'description' => 'Entity table to store subscription settings against',
'fields' => array(
'subscription_settings_id' => array(
'description' => 'Primary key: Unique subscriber ID.',
'type' => 'serial',
'not null' => TRUE,
),
'data' => array(
'description' => 'An of settings to do with this partys subscription',
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'subscription_settings_id',
),
);
return $schema;
}