Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
raymond
Posts: 4
Joined: 04 Aug 2017, 11:24

Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by raymond »

Hi everybody,

I'm trying to upgrade MantisBT from version 1.2.19 to 2.5.1.
First, I tested it on a seperate server with an image of our production server. The install script showed some messages (e.g. for the new config directory) and there were some new things (e.g. that salt), but everything went well in the end.
Version 1.2.19, schema 183 became 2.5.1, schema 209.

But now on the production server, the install script ends with the message "Schema step 194: UpdateFunction ( check_token_serialization )" (see 1st attachment). And I don't know what to do, to solve this problem. I cannot find any info about this in the admin guide nor on this forum.
Also I looked into the code a bit (found the install_check_token_serialization function), but I don't know which table is involved. I'm not a programmer, just a testmanager :?

Although I got this error, I tried MantisBT. It looked as if everything worked fine. Also check db_stats.php (see 2nd attachment).
But it is our production, so I did a rollback.

Both servers have PHP Version 5.5.9-1ubuntu4.20 (with MySQL 5.5.53). The only difference between them is, that production uses https and the testserver http.

What do I have to do, to correct this?

Raymond.
Attachments
db_stats.PNG
db_stats.PNG (41.66 KiB) Viewed 6257 times
Mantis error.PNG
Mantis error.PNG (29.34 KiB) Viewed 6257 times
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by atrol »

Deleting all entries in mantis_tokens_table before running the upgrade should do the job.
Please use Search before posting and read the Manual
raymond
Posts: 4
Joined: 04 Aug 2017, 11:24

Re: Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by raymond »

Thank you Atrol.

Today I was digging a bit deeper and found out that mantis_tokens_table stores temporarily strings, so your suggestion would indeed work.
A new image was placed on the testserver and again the upgrade went fine. Friday I will do the upgrade on our production server, and will keep your tip in mind. I let you know if it is a succes.

BTW With the digging I saw that the function install_check_token_serialization() uses hardcoded token type 2 in its SQL. But constant_inc.php has no define for number 2. I don't know if that's a problem anywhere in the code. I just wanted to point that out.
Mati
Posts: 2
Joined: 09 Aug 2017, 15:20

Re: Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by Mati »

Hi Atrol (since you seem quite experience with v 2.5)

We are also thinking about upgrading from v1.2.19 to v2.5. Long overdue but especially now that we need to integrate mantis with another app we are building and since v.2.5 includes a REST API will be much better and sustainable than doing it with current SOAP API

The problem is this upgrade will imply a massive change management and we don’t have time for that. So my question is can we upgrade it (so we benefit from the above) but can we some how deactivate / disable the new User interface?

Thanks a lot in advanced
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by atrol »

raymond wrote: But constant_inc.php has no define for number 2. I don't know if that's a problem anywhere in the code. I just wanted to point that out.
Thanks for the hint. It's no problem in current code as this token is no longer used.
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by atrol »

Mati wrote:but can we some how deactivate / disable the new User interface?
Not possible by a simple configuration option.

The first version that started with REST API is 2.3.0, https://www.mantisbt.org/bugs/view.php?id=22598
BTW, REST API is still experimental.

The last version that comes with the old UI is 1.3.11 at the moment.
The UI is similar to 1.2.19, of course it's not 100% the same.

You would have to reapply all REST related changes from versions >= 2.3.0 to the 1.3.x branch to get what you want.

Another option could be to run 1.3.x (for the UI) and 2.x.x (for the API) in parallel.
This is possible at the moment, as there is no difference in database schema.
Mati wrote:The problem is this upgrade will imply a massive change management and we don’t have time for that.
What does "massive change management" mean?
Please use Search before posting and read the Manual
Mati
Posts: 2
Joined: 09 Aug 2017, 15:20

Re: Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by Mati »

Thanks so much for your help :)
raymond
Posts: 4
Joined: 04 Aug 2017, 11:24

Re: Upgrade 1.2.19 -> 2.5.1: error in schema step 194

Post by raymond »

Atrol, thanks again.

This time the upgrade in production succeeded. Although the upgrade with in new image on the testserver went fine, I still got the same error in production.

For future users with the same problem.
I found out that the first record had mantis_tokens_table.value = null, but was correctly filled with a valid value on the testserver. I don't know how that is possible, when you use an image, but deleting only that record was the solution.
Post Reply