Mantis 2.4 SQl Server wrong query generated

Get help from other users here.

Moderators: Contributor, Developer

Post Reply
ghirschy
Posts: 5
Joined: May 15, 2018 12:58 pm

Mantis 2.4 SQl Server wrong query generated

Post by ghirschy » May 16, 2018 9:28 am

Mantis 2.4 install on MS sql srv 2005 wrong query generated.

Schema step 2: CreateTableSQL ( mantis_bug_file_table )
the generated query is:
CREATE TABLE mantis_bug_file_table ( id INT IDENTITY(1,1) NOT NULL, bug_id INT DEFAULT 0 NOT NULL, title VARCHAR(250) DEFAULT '' NOT NULL, description VARCHAR(250) DEFAULT '' NOT NULL, diskfile VARCHAR(250) DEFAULT '' NOT NULL, filename VARCHAR(250) DEFAULT '' NOT NULL, folder VARCHAR(250) DEFAULT '' NOT NULL, filesize INT DEFAULT 0 NOT NULL, file_type VARCHAR(250) DEFAULT '' NOT NULL, date_added TIME DEFAULT '1970-01-01T00:00:00' NOT NULL, content IMAGE NULL, PRIMARY KEY (id) )

TIME is not valid data type. I think it should be DATETIME instead.

I cannot continue with the installatoin even if I ran the correct query by hand on the data base.

Any solution for this kind of problem? I will have problems with all the TIME columns

ghirschy
Posts: 5
Joined: May 15, 2018 12:58 pm

Re: Mantis 2.4 SQl Server wrong query generated

Post by ghirschy » May 16, 2018 11:39 am

The problem is in the datadict-mssqlnative.inc.php file.

The map set the time columsn as TIME insted of DATETIME. I did the change manually and the problem was solved.

atrol
Site Admin
Posts: 7305
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Mantis 2.4 SQl Server wrong query generated

Post by atrol » May 17, 2018 2:03 am

ghirschy wrote:
May 16, 2018 11:39 am
The problem is in the datadict-mssqlnative.inc.php file.
This file is part of o 3rd party component.
I would be good if you create a bug report for it at https://github.com/ADOdb/ADOdb/issues to have it fixed in future versions.
Please use Search before posting and read the Manual

Post Reply