Mantis 2.4 SQl Server wrong query generated

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
ghirschy
Posts: 6
Joined: 15 May 2018, 17:58

Mantis 2.4 SQl Server wrong query generated

Post by ghirschy »

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: 6
Joined: 15 May 2018, 17:58

Re: Mantis 2.4 SQl Server wrong query generated

Post by ghirschy »

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: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Mantis 2.4 SQl Server wrong query generated

Post by atrol »

ghirschy wrote: 16 May 2018, 16:39 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