Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php MantisBT插件表未创建_Php_Mysql_Plugins_Xampp_Mantis - Fatal编程技术网

Php MantisBT插件表未创建

Php MantisBT插件表未创建,php,mysql,plugins,xampp,mantis,Php,Mysql,Plugins,Xampp,Mantis,我的MantisBT插件表有一些问题。插件本身已安装并正在运行,但在安装插件时未创建插件表 我只是将schema函数添加到我的plugin类中以创建表: function schema() { return array( array("CreateTableSQL", array(plugin_table("test"), " id I NOTNULL UNSIGNED AUTOINCREMENT PRIMARY

我的MantisBT插件表有一些问题。插件本身已安装并正在运行,但在安装插件时未创建插件表

我只是将schema函数添加到我的plugin类中以创建表:

function schema()
{       
    return array(
            array("CreateTableSQL", array(plugin_table("test"), "
                id I NOTNULL UNSIGNED AUTOINCREMENT PRIMARY
            "))
    ); 
}
第三方插件也是如此:安装时不会创建表

我使用的是mantisbt1.2.14和xampp1.7.7。在Windows7上。顺便说一下,数据库用户拥有对数据库执行操作的所有权限


问题出在哪里?有谁知道一个关于螳螂模式定义的好文档吗?

我找到了解决方案。Mantis在创建数据表的同时在“Mantis_config_table”中创建配置数据集

如果删除此数据集(对于插件“Test”,它将是具有config_id“plugin_Test_schema”的集)或将值设置为-1,则可以升级/创建数据库中尚不可用的数据表。您可以作为管理员在“管理/管理插件”菜单中执行此操作


提示:也可以在“管理/管理配置”菜单中以管理员身份直接编辑/删除插件的配置。

重新安装插件的过程已完成

1) uninstall the plugin with mantis: Manage / Manage Plugins
2) delete plugin config with mantis: Manage / Manage Configuration
3) drop the table with mysql: DROP TABLE your_plugin_table_name;
另一个很好的解决方案是创建一个函数插件\u callback\u uninstall(),用于删除创建的表

希望这有帮助