heisencache-8.x-1.x-dev/heisencache.install

heisencache.install
<?php
/**
 * @file
 * Heisencache installer: define the SQL Writer schema
 *
 * @author: Frederic G. MARAND <fgm@osinet.fr>
 *
 * @copyright (c) 2013-2014 Ouest Systèmes Informatiques (OSInet).
 *
 * @license General Public License version 2 or later
 */

use Drupal\heisencache\SqlWriterSubscriber;

#require_once __DIR__ . '/vendor/autoload.php';

/**
 * Implements hook_schema().
 */
function Zheisencache_schema() {
  $ret = array();

  $ret[SqlWriterSubscriber::SINK] = array(
    'description' => 'Stores raw Heisencache events par page cycle, not meant for direct consumption.',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => "The page cycle id",
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'data' => array(
        'type' => 'text',
        // On MySQL, medium text only holds up to 16 MB.
        // Some configurations may write more than this.
        'size' => 'big',
        'not null' => TRUE,
        'description' => 'The event data in bulk, as observed by subscribers',
      ),
    ),
    'primary key' => array('id'),
  );

  return $ret;
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc