You are here

function mailchimp_lists_schema in Mailchimp 7.2

Implements hook_schema().

File

modules/mailchimp_lists/mailchimp_lists.install, line 17
Install, update and uninstall functions for the mailchimp_lists module.

Code

function mailchimp_lists_schema() {
  $schema['mailchimp_lists'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique mailchimp_list entity ID.',
      ),
      'name' => array(
        'description' => 'The machine-readable name of this mailchimp_list type.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'mc_list_id' => array(
        'type' => 'varchar',
        'not null' => TRUE,
        'length' => 32,
        'description' => 'The MailChimp list id associated with this list.',
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 32,
        'description' => 'The {mailchimp_lists}.label of this mailchimp_list.',
        'not null' => TRUE,
        'default' => '',
      ),
      'description' => array(
        'type' => 'varchar',
        'length' => 255,
        'description' => 'The {mailchimp_lists}.description of this mailchimp_list.',
        'not null' => FALSE,
        'default' => '',
      ),
      'settings' => array(
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'A serialized object that stores the settings for the specific list.',
      ),
      'status' => array(
        'type' => 'int',
        'not null' => TRUE,
        // Set the default to ENTITY_CUSTOM without using the constant as it is
        // not safe to use it at this point.
        'default' => 0x1,
        'size' => 'tiny',
        'description' => 'The exportable status of the entity.',
      ),
      'module' => array(
        'description' => 'The name of the providing module if the entity has been defined in code.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique key' => array(
      'name',
    ),
  );
  return $schema;
}