Closed pluk77 closed 4 years ago
CREATE TABLE
mantis_plugin_ToDoLists_tasks_table
(id
int(10) UNSIGNED NOT NULL,bug_id
int(10) UNSIGNED NOT NULL DEFAULT '0',description
varchar(120) NOT NULL DEFAULT '',finished
tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
and remove "public function schema() {}" in "ToDoLists.php"
Better do not modify source files since this could make it harder for you to upgrade plugin in the future. @pluk77 , what version of plugin do you have installed?
I think I have version 2.0.1
In ToDoLists.php I did make a change to line 63 get it to install properly as 'f' is not a valid default value for an integer field:
finished L DEFAULT \'f\''
to: finished L DEFAULT \'0\''
Okay, so this is how it was done in the previous release and was changed due to https://github.com/andrzejkupczyk/mantisbt-todolists/issues/7 issue. This is silly :) I'll check it ASAP.
Seems like somewhere the column types for Postgress and MySQL are not compatible and are not 'translated' into the same type.
Others seems to have similar problems with compatibility: https://www.mantisbt.org/bugs/view.php?id=26109
Yeah, this is exactly what I've suspected. MantisBT (using ADOdb) should build proper query based on a database.
I'll try to solve this problem.
@pluk77 I've just tested and released the patch v2.0.2.
I hope it will work for you.
Trying to install but am getting this error:
Upgrading the plugin schema failed at step #0. Error "Invalid default value for 'finished'" occurred while executing the following statement(s):