.install file not working, please help since it is urgent

Syed_Shah - June 25, 2009 - 16:27

Hello all, I am writing the following code in my .install file. its purpose is to create a table in database, which will be used later, but when i install the module, i am not seeing any table in the database. Kindly have a look at the following code and let me know if i am making any mistake.

function split_test_schema() {
$schema = array();
$schema['split_test'] = array(
'fields' => array(
'stid'=>array('type'=>'serial','unsigned'=>true),
'page1'=>array('type'=>'varchar','length'=>200),
'page1_hits'=>array('type'=>'int','length'=>10,'default'=>0),
'page1_conv'=>array('type'=>'int','length'=>10,'default'=>0),
'page2'=>array('type'=>'varchar','length'=>200),
'page2_hits'=>array('type'=>'int','length'=>10,'default'=>0),
'page2_conv'=>array('type'=>'int','length'=>10,'default'=>0),
'action'=>array('type'=>'varchar','length'=>200),
'hit_limit'=>array('type'=>'int','length'=>10),
// 'active'=>array('type'=>'int','length'=>1,'size'=>'tiny'),
),
'primary key' => array('stid'),
);
return $schema;
}
function split_test_install()
{
drupal_install_schema('split_test');
}

function split_test_uninstall()
{
drupal_uninstall_schema('split_test');
}.

My drupal website also times out at times, like when i click on module or install any module and try to clear the cache, the website acts too slow. any reason in mind as why could this be happening.

Thanks

 
 

Drupal is a registered trademark of Dries Buytaert.