I have a simple 'form_example' module and I want to add a database table when instaling module. I created this form_example.install file:
<?php
function form_example_schema() {
$schema['form_example_table'] = array(
'description' => 'Table for form_pokus module',
'fields' => array(
'id' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
'name' => array('type' => 'varchar','length' => 30, 'not null' => TRUE, 'default' => ''),
'gender' => array('type' => 'varchar','length' => 30, 'not null' => TRUE, 'default' => ''),
'message' => array('type' => 'text', 'not null' => TRUE, 'default' => ''),
'status' => array('type' => 'text', 'not null' => FALSE ),
'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
),
'primary key' => array('id'),
);
return $schema;
}
I disabled this module, then deleted it from directory, flushed all chaches and then installed and enabled again this module, now with .install file. But new table is not appearing in database. Im using PostgresSQL. What I am missing?