You are here

function sendinblue_schema in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 sendinblue.install \sendinblue_schema()
  2. 7.2 sendinblue.install \sendinblue_schema()
  3. 7 sendinblue.install \sendinblue_schema()

Implements hook_schema().

File

./sendinblue.install, line 13
Install, update and uninstall functions for the sendinblue module.

Code

function sendinblue_schema() {
  $schema['sendinblue_contact'] = [
    'fields' => [
      'sc_id' => [
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique sendinblue_contact entity ID.',
      ],
      'email' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Unique Key: Unique the email of a subscriber.',
      ],
      'info' => [
        'type' => 'text',
        'not null' => TRUE,
        'description' => 'All information of a subscriber.',
      ],
      'code' => [
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
        'description' => 'Unique identifier for a subscriber on frontend.',
      ],
      'is_active' => [
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
      ],
    ],
    'primary key' => [
      'sc_id',
    ],
    'unique key' => [
      'email',
    ],
  ];
  return $schema;
}