I have some trouble with my MantisBT plugin table. The plugin itself is installed and running but the plugin table is not created while installing the plugin.
I simply added the schema-function to my plugin class to create the table:
function schema()
{
return array(
array("CreateTableSQL", array(plugin_table("test"), "
id I NOTNULL UNSIGNED AUTOINCREMENT PRIMARY
"))
);
}
The same for third party plugins: tables are not created while installing them!
I'm using MantisBT 1.2.14 and XAMPP 1.7.7. on Windows 7. The database user by the way has ALL PRIVILEDGES for actions on the database.
Where can the problem be? And does anybody know a good documentation about schema definition for mantis?
I found the solution. Mantis creates a config data set in the "mantis_config_table" while creating the data table.
If one deletes this data set (for a plugin "Test" it would be the set with config_id "plugin_Test_schema") or sets the value to -1 one is able to upgrade/create the data table if not available in the data base yet. You can do this as administrator in the "Manage / Manage Plugins" menu.
Hint: It is also possible to edit/delete the config directly for your plugin as administrator in the "Manage/ Manage Configuration" menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With