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

Comments

mm167’s picture

I dont see any error in your codes and steps.

as u mentioned "time out", may be, that's the problem.

if u are testing in a local PC, why not test your module with only the drupal 6.x core plus minimal optional modules. Ensure that there's no time out issue.

also, try not testing the new module, but fix the "time out" issue before u go on.

Don't mix up 2 problems. Separate them and kill them 1 by 1.

good luck.
---------------------------------------------------------
toll free is good, but pay toll may go faster ...
we go the drupalway. how about u?
www.drupalway.com - pay toll to go faster

sai571’s picture

Delete the module row from {system} table and try again!

If you're not willing to do that, you can do

UPDATE system SET schema_version=-1 WHERE name='split_test'

Here i'm assuming that you're module name is "split_test"

hkvd’s picture

Thanks a lot sai.... Your solution worked for me!!!

akaash19’s picture

Its a problem sometimes