View Issue Details

IDProjectCategoryView StatusLast Update
0029262mantisbtinstallationpublic2021-11-24 06:26
Reporterboardhead360 Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version2.25.2 
Summary0029262: Schema step 168: DropColumnSQL ( mantis_sponsorship_table ) BAD
Description

during install of database, message appears and stops installation:
BAD
ALTER TABLE mantis_sponsorship_table DROP COLUMN last_updated
Can't DROP 'last_updated'; check that column/key exists

A check of the db shows that column doesn't exist, last_update_int exists

TagsNo tags attached.

Activities

boardhead360

boardhead360

2021-11-10 10:03

reporter   ~0066007

I guess this is not a major issue. The tables get created, so I was able to continue the installation without the script. I did run into issues with schema steps beyond 168, where the commands were not implemented and I had to manually add some columns.

dregad

dregad

2021-11-10 10:21

developer   ~0066008

Is this a new install or an upgrade ? If the latter, from which version ?

FYI: Schema step 168 is part 3 of 4, of an operation to convert the last_updated column's type from date/time (used in MantisBT < 1.2) to integer:

  1. create a last_updaded_int column
  2. migrate contents of legacy last_updated (datetime) column into last_updated_int (epoch)
  3. delete last_updated column
  4. rename last_updated_int to last_updated

I can't offer any explanation for the missing column, especially if step 167 was successful... it does not make sense. Did you run the upgrade script twice ? Executed some SQL directly against the DB ? Encounter any other errors during the installation process ?

boardhead360

boardhead360

2021-11-12 17:44

reporter   ~0066020

This was a new install. I did add the field manually, which got me going for a little bit, then ran into the same missing field issue on another table. So it appears that some of the scripts executed correctly, while others did not.
I tried to run the install again and got the following message: "Please note that executing the generated script below may not result in a fully functional database, particularly in upgrade scenarios. This is due to the fact that some upgrade steps require the execution of PHP code; these Upgrade Functions are defined in install_helper_functions_api.php and cannot be translated to SQL statements. Use at your own risk."

As a result, I'm not sure I can actually fix the tables myself. But I will try and report back.

dregad

dregad

2021-11-14 13:18

developer   ~0066026

I'm surprised to hear the installation process failed on a brand new install. I've never seen this happen before.

got the following message: "Please note that executing the generated script below may not result in a fully functional database

So you installed by generating the SQL script and executing that manually ?
This is not recommended. Unless you have a compelling reason to do so, I strongly suggest you let the installer do the work for you.

I'm not sure I can actually fix the tables myself.

You should not. Chances are you'll screw up somewhere without noticing at first, and end up with problems down the line.

Without further information leading to a reproducible case, I don't think I would be able to help much. You need to figure out why the column does not exist at that stage.

boardhead360

boardhead360

2021-11-14 21:24

reporter   ~0066029

I'm not trying to run the installation manually. I was trying to understand why it stopped specifically at that error.
I tried the install a few more time, first deleting the mantisbt schema from mysql, then re-running the installation. I get the following error from firefox browser:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

I then go back to the administration page and try to run the installation again, that's how I get an error from the mantis install script indication that it is trying to delete a field that doesn't exist.
I repeated the procedure a few more time and it not always at step 168 that I get the error. I've also hed it at step 131 and 171.

I've repeated the procedure through Chrome with the same result

dregad

dregad

2021-11-15 01:01

developer   ~0066030

500 - Internal server error.

This likely explains your problem. You need to check your php error log for details about what happened..

dregad

dregad

2021-11-24 06:26

developer   ~0066049

@boardhead360,

You did not provide any feedback; I am therefore resolving this issue. Feel free to reopen itat a later time and provide the requested information.