Take the 2-minute tour ×


function example_install() {
 * Implements hook_schema().
function example_schema() {
  $schema['example'] = array(
    'description' => 'example settings',
    'fields' => array(
      'name' => array(
        'description' => 'name',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,

      'age' => array(
        'description' => 'age',
        'type' => 'int',
    'size' => 'tiny',
        'not null' => TRUE,
)    ,
  return $schema;

Can any one explain whats wrong.

share|improve this question
add comment

1 Answer





share|improve this answer
This post also helped me because in this instance I had been trying to create a database that was referring to invalid indexes. The table simply didn't create and I didn't find any debugging output to see what is going wrong. Finally the fixing the 'indexes' and doing an uninstall recreated the lot. –  Eugene van der Merwe Apr 28 at 10:54
add comment

Your Answer


