You are here

function poptin_schema in Website Popups, Email Popup, Exit-Intent Popup, and Contact Forms – Poptin 8

Same name and namespace in other branches
  1. 7 poptin.install \poptin_schema()

Implements poptin_schema().

File

./poptin.install, line 11
Module for creating table on time of install and drop on time of uninstall.

Code

function poptin_schema() {
  $schema['poptin'] = [
    'description' => 'The base table for nodes.',
    'fields' => [
      'pid' => [
        'description' => 'The primary identifier for a Poptin Entry.',
        'type' => 'serial',
        'length' => 32,
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'user_id' => [
        'description' => 'The poptin userid.',
        'type' => 'varchar',
        'length' => 32,
        'default' => 0,
      ],
      'client_id' => [
        'description' => 'The poptin clientid.',
        'type' => 'varchar',
        'length' => 32,
        'default' => '',
      ],
      'token' => [
        'description' => 'The poptin token.',
        'type' => 'varchar',
        'length' => 255,
        'default' => '',
      ],
    ],
    'primary key' => [
      'pid',
    ],
  ];
  return $schema;
}