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

signed_nodes.install
<?php
/**
 * @file
 * Install, update, and uninstall functions for the signed_nodes module.
 */

/**
 * Implementation of hook_schema().
 */
function signed_nodes_schema() {
  $schema['signed_nodes'] = array(
    'fields'      => array(
      'snid'      => array('type' => 'serial', 'not null' => TRUE),
      'nid'       => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
      'year'      => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'purge_year'      => array('type' => 'varchar', 'length' => '3', 'not null' => TRUE, 'default' => ''),
      'agreement_message'   => array('type' => 'text', 'size' => 'big', 'not null' => TRUE)),
    'primary key' => array('snid'),
    'unique keys' => array(
      'nid_year' => array('nid', 'year')),
  );
  $schema['signed_nodes_user'] = array(
    'fields' => array(
      'snid'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
      'uid'   => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10')),
    'unique keys' => array(
      'snid_uid' => array('snid', 'uid')),
  );
  return $schema;
}

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

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