Hi,
I'm having some troubles with the hook_schema and hook_install.
So I want to create a table when activating my module. Seems that it's not working very well.
I don't get any errors when activating the module, but I don't get the defined table in my database.
If someone could check with I'm doing wrong?
Code in my .install file:
<?php
/*
* Implements hook_schema()
*/
function fb_recommend_schema(){
$schema['fb_recommend'] = array(
'fields' => array(
'id' => array(
'description' => 'The ID',
'type' => 'int',
'size' => 'big',
'not null' => TRUE,
),
'url' => array(
'description' => 'The url that is needed to show the facebook recommend box',
'type' => 'text',
'size' => 'normal',
),
'not null' => TRUE,
'width' => array(
'description' => 'The width of the facebook recommend box',
'type' => 'int',
'size' => 3,
'not null' => TRUE,
),
'height' => array(
'description' => 'The height of the facebook recommend box',
'type' => 'int',
'size' => 3,
'not null' => TRUE,
),
),
'primary_key' => array('id'),
);
return $schema;
}
/*
* Implements hook_install()
*/
function fb_recommend_install(){
drupal_install_schema('fb_recommend');
}
/*
* Implements hook_uninstall()
*/
function fb_recommend_uninstall(){