【问题标题】:MantisBT plugin table not createdMantisBT 插件表未创建
【发布时间】:2013-02-21 06:28:21
【问题描述】:

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

我只是将模式函数添加到我的插件类中以创建表:

function schema()
{       
    return array(
            array("CreateTableSQL", array(plugin_table("test"), "
                id I NOTNULL UNSIGNED AUTOINCREMENT PRIMARY
            "))
    ); 
}

第三方插件也是如此:安装时不会创建表格!

我正在使用 MantisBT 1.2.14 和 XAMPP 1.7.7。在 Windows 7 上。顺便说一下,数据库用户拥有对数据库执行操作的所有权限。

问题可能出在哪里?有人知道关于螳螂模式定义的文档吗?

【问题讨论】:

    标签: php mysql plugins xampp mantis


    【解决方案1】:

    我找到了解决方案。 Mantis 在创建数据表时会在“mantis_config_table”中创建一个配置数据集。

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

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

    【讨论】:

      【解决方案2】:

      我重装插件时的过程一直。

      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;
      

      另一个不错的解决方案是创建一个函数 plugin_callback__uninstall() 来删除创建的表。

      Mantis Plugin Documentation (see bottom of the page)

      希望对你有帮助

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-12-06
        • 1970-01-01
        • 2019-01-13
        • 2015-02-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多