View Issue Details

IDProjectCategoryView StatusLast Update
0022735mantisbtupgradepublic2020-03-10 17:23
ReporterRachu Assigned Todregad  
Status closedResolutionno change required 
Product Version2.3.0 
Summary0022735: Error upgrade Mantis 1.2.19 to 2.3 Ms Sql 2014

Hello everyone, I'm having problems upgrading from version 1.2.19 mantis to 2.13 in Sql Server 2014 Bd, and when I run the installer appears this error:

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) )
SQLState: 42S01 Error Code: 2714 Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Ya hay un objeto con el nombre 'mantis_bug_file_table' en la base de datos.

--> An object with the name 'mantis_bug_file_table' already exists in the database.

I do not understand why being an update, the installer tries to create the tables again, this would not erase the information I already have ?.

Thank you.

TagsNo tags attached.




2017-04-15 18:16

reporter   ~0056570

I guess this is a manual setup/installation of 1.2.x. AFAIK there was no way back then
to get a clean install out of the box with mssql. I am quite sure, the one who managed
the install, forgot to set the database_version in the config table.

The install/upgrade uses this to run the appropriate steps from schema.php.

For 1.2.x that should be 183. Fix that (SSMS) and try again.



2017-04-15 19:06

reporter   ~0056572

Hi @obmsch , thanks for your answer, is correctly but values is 209.

Note: #56570




2017-04-15 19:07

reporter   ~0056573

Last edited: 2017-04-16 13:12

View 2 revisions

Sorry, is 0022063:0054936



2017-04-16 05:03

reporter   ~0056575

@rachu Sure after a successful install/upgrade to 2.3 (in fact 1.3+) the
database_version in config table is 209. You tried an upgrade from 1.2.19
which errored out at step 1. My conclusion was, that at this point the
value was 0. I asked you to set it to the correct value 183 for your 1.2.19
installation and try the upgrade again.
So, is this still an issue or have you upgraded sucessfully?



2017-04-18 12:33

reporter   ~0056610

Hi @obmsch,
Hello, the database_version variable was in zero (0), I put it in 209 and I was able to upgrade to version 2.3, however, I will perform the process again by updating the parameter to 183 as you mention it and I will inform you, But updated correctly with the value at 209.




2017-04-18 14:15

reporter   ~0056612

@rachu You definitely didn't upgrade sucessfully. By putting 209 in there,
You told the install/upgrade your db is already at v209, although the 'real'
version was 183. All schema changes from 184-209 (new/altered tables,
columns, indexes) needed for 2.3 are not there!
I suggest You restore the db (prior to your first upgrade attempt), set the
version to 183 and rerun the upgrade/installation.



2017-04-20 20:25

reporter   ~0056631

@obmsch Many thanks to the explanation, I will redo the process by setting the database_version parameter to 183, and I'll tell you how it goes.

I have a question: what is the functionality of the database_version variable, as in what value should I have it?

Thank you very much.



2020-02-25 11:07

developer   ~0063688

The solution suggested by obmsch is probably correct (i.e. set database_version to 183).

Considering that it has been nearly 3 years without update, I'm assuming you either managed to fix the problem or gave up on it, so closing this as no change required. Feel free to reopen if needed.

Issue History

Date Modified Username Field Change
2017-04-15 11:46 Rachu New Issue
2017-04-15 18:16 obmsch Note Added: 0056570
2017-04-15 19:06 Rachu Note Added: 0056572
2017-04-15 19:07 Rachu Note Added: 0056573
2017-04-16 05:03 obmsch Note Added: 0056575
2017-04-16 13:12 dregad Note Edited: 0056573 View Revisions
2017-04-18 12:33 Rachu Note Added: 0056610
2017-04-18 14:15 obmsch Note Added: 0056612
2017-04-20 20:25 Rachu Note Added: 0056631
2020-02-25 11:07 dregad Assigned To => dregad
2020-02-25 11:07 dregad Status new => resolved
2020-02-25 11:07 dregad Resolution open => no change required
2020-02-25 11:07 dregad Note Added: 0063688
2020-03-10 17:23 atrol Status resolved => closed