Mercurial > hg > cmmr2012-drupal-site
view vendor/chi-teck/drupal-code-generator/templates/d7/install.twig @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
line wrap: on
line source
<?php /** * @file * Install, update and uninstall functions for the {{ name }} module. */ /** * Implements hook_schema(). */ function {{ machine_name }}_schema() { $schema['{{ machine_name }}_table'] = array( 'description' => 'Table description', 'fields' => array( 'id' => array( 'type' => 'serial', 'not null' => TRUE, 'description' => 'Primary Key: Unique ID.', ), 'title' => array( 'type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '', 'description' => 'Column description', ), 'weight' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0, 'description' => 'Column description', ), ), 'primary key' => array('id'), 'unique keys' => array( 'title' => array('title'), ), 'indexes' => array( 'weight' => array('weight'), ), ); return $schema; }