2022-04-27 11:30:43 +02:00

45 lines
966 B
Twig

<?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;
}