我.install文件的代码
function test_install() { drupal_install_schema('test');}
function test_uninstall() { drupal_uninstall_schema('test');}
function test_schema() {$schema['test'] = array( 'description' => 'The base table for nodes.', 'fields' => array( 'userid' => array('type' => 'int', 'not null' => TRUE, 'length'=>11), 'UserAgent' => array('type' => 'text', 'not null' => TRUE), ), 'primary key' => array('userid'),);return $schema;}
第一次加载模块的时候,sql里面没有test这张表。然后我卸载了这个模块,再安装,他跳错误,说这张表已经存在。SQL中突然就出来了这张表,而且再卸载test表就没了,但是再安装还是同样的报错,表已存在,test表也在SQL中莫名其妙出来了。求解决,本人菜鸟。
function test_install() { drupal_install_schema('test');}
function test_uninstall() { drupal_uninstall_schema('test');}
function test_schema() {$schema['test'] = array( 'description' => 'The base table for nodes.', 'fields' => array( 'userid' => array('type' => 'int', 'not null' => TRUE, 'length'=>11), 'UserAgent' => array('type' => 'text', 'not null' => TRUE), ), 'primary key' => array('userid'),);return $schema;}
第一次加载模块的时候,sql里面没有test这张表。然后我卸载了这个模块,再安装,他跳错误,说这张表已经存在。SQL中突然就出来了这张表,而且再卸载test表就没了,但是再安装还是同样的报错,表已存在,test表也在SQL中莫名其妙出来了。求解决,本人菜鸟。