communico_plus-1.0.0-beta3/communico_plus.install

communico_plus.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the communico_plus module.
 */

use Drupal\Core\Database\Database;

/**
 * Implements hook_schema().
 *
 * @see hook_schema()
 * @ingroup communico_plus
 * @return array
 */
function communico_plus_schema() {
  $schema['communico_locations'] = [
    'description' => 'Storage for Communico Plus event locations dropdown form element data.',
    'fields' => [
      'location_id' => [
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => 'Location Id',
      ],
      'location_name' => [
        'type' => 'text',
        'size' => 'medium',
        'not null' => FALSE,
        'description' => 'Location Name',
      ],
    ],
    'unique keys' => [
    'location_id' => ['location_id'],
    ],
    'primary key' => ['location_id'],
  ];
  $schema['communico_types'] = [
    'description' => 'Storage for Communico Plus event types dropdown form element data.',
    'fields' => [
      'number' => [
        'type' => 'varchar',
        'length' => 4,
        'not null' => TRUE,
        'description' => 'Element Number',
      ],
      'descr' => [
        'type' => 'text',
        'size' => 'medium',
        'not null' => FALSE,
        'description' => 'Event Type',
      ],
    ],
    'unique keys' => [
      'number' => ['number'],
    ],
    'primary key' => ['number'],
  ];
  $schema['communico_ages'] = [
    'description' => 'Storage for Communico Plus event age groups dropdown form element data.',
    'fields' => [
      'number' => [
        'type' => 'varchar',
        'length' => 4,
        'not null' => TRUE,
        'description' => 'Element Number',
      ],
      'groupname' => [
        'type' => 'text',
        'size' => 'medium',
        'not null' => FALSE,
        'description' => 'Age Groups',
      ],
    ],
    'unique keys' => [
      'number' => ['number'],
    ],
    'primary key' => ['number'],
  ];
  return $schema;
}

/**
 * Implements hook_install().
 *
 * @see hook_install()
 *
 * @ingroup communico_plus
 */
function communico_plus_install() {
#
}




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

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