Upgrade from 1.1.8 to 1.2.2 not so good

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
gnewtzie
Posts: 4
Joined: 01 Sep 2010, 15:31

Upgrade from 1.1.8 to 1.2.2 not so good

Post by gnewtzie »

Couple of observations. The Database_version field in the config file was not there from the 1.1.8 version. Therefore the install.php would think it's a new installation. I set it to $g_database_version = '1.1.8'; and it doesn't show the bad config file anymore. This being said, it's still trying to run the BAD
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 DATETIME DEFAULT '1970-01-01 00:00:01' NOT NULL, content IMAGE NOT NULL, PRIMARY KEY (id) )
There is already an object named 'mantis_bug_file_table' in the database.

when the db already exists. It doesn't appear to be running an "Upgrade" path instead of a fresh install.

Version info:
Mantis 1.1.8
mssql db. version 2008
php 5.2.10
on IIS with fastcgi running php.

config file is very simple.

<?php
$g_hostname = 'silicon';
$g_db_type = 'mssql';
$g_database_name = 'MantisBugTracker';
$g_db_username = 'mantis';
$g_db_password = 'xxxxxxxx';
$g_email_receive_own = ON;
$g_database_version = '1.1.9';

?>
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade from 1.1.8 to 1.2.2 not so good

Post by atrol »

gnewtzie wrote:The Database_version field in the config file was not there from the 1.1.8 version. Therefore the install.php would think it's a new installation.
This is not right, the upgrade process looks in db for database version
gnewtzie wrote:$g_database_version = '1.1.9';
Database version and MantisBT version are to seperate things.
For example database version of MantisBT 1.2.2 is 183

Just start your upgrade without any entry in config_inc.php
Please use Search before posting and read the Manual
gnewtzie
Posts: 4
Joined: 01 Sep 2010, 15:31

Re: Upgrade from 1.1.8 to 1.2.2 not so good

Post by gnewtzie »

[ Back to Administration ] Pre-Installation Check


APPLICATION WARNING #403: Database field "enabled" not found.

Checking Installation...
Config File Exists - Upgrade GOOD
Setting Database Type GOOD
Checking Database connection settings exist GOOD
Checking PHP support for database type GOOD
Config File Exists but Database does not POSSIBLE PROBLEM
Bad config_inc.php?
Checking PHP version (your version is 5.2.10) GOOD
Checking if safe mode is enabled for install script GOOD
Installation Options
Type of Database
Hostname (for Database Server)
Username (for Database)
Password (for Database)
Database name (for Database)
Admin Username (to create Database if required)
Admin Password (to create Database if required)
Print SQL Queries instead of Writing to the Database
Attempt Installation

It throws the bad config_inc.php error
wmadmin
Posts: 45
Joined: 10 Jul 2009, 14:38

Re: Upgrade from 1.1.8 to 1.2.2 not so good

Post by wmadmin »

I tried to Upgrade Mantis 1.1.8 to mantis 1.2.2

Code: Select all

mysql> show tables;
+-----------------------------------+
| Tables_in_mantis                  |
+-----------------------------------+
| mantis_bug_file_table             | 
| mantis_bug_history_table          | 
| mantis_bug_monitor_table          | 
| mantis_bug_relationship_table     | 
| mantis_bug_revision_table         | 
| mantis_bug_table                  | 
| mantis_bug_tag_table              | 
| mantis_bug_text_table             | 
| mantis_bugnote_table              | 
| mantis_bugnote_text_table         | 
| mantis_category_table             | 
| mantis_config_table               | 
| mantis_custom_field_project_table | 
| mantis_custom_field_string_table  | 
| mantis_custom_field_table         | 
| mantis_email_table                | 
| mantis_filters_table              | 
| mantis_news_table                 | 
| mantis_plugin_table               | 
| mantis_project_category_table     | 
| mantis_project_file_table         | 
| mantis_project_hierarchy_table    | 
| mantis_project_table              | 
| mantis_project_user_list_table    | 
| mantis_project_version_table      | 
| mantis_sponsorship_table          | 
| mantis_tag_table                  | 
| mantis_tokens_table               | 
| mantis_user_pref_table            | 
| mantis_user_print_pref_table      | 
| mantis_user_profile_table         | 
| mantis_user_table                 | 
+-----------------------------------+
32 rows in set (0.00 sec)
Image

Image

Image

Why install.php tried to create tables if there already exist ?
Install finished only when i renamed 3 tables:

Code: Select all

RENAME TABLE mantis_plugin_table TO mantis_plugin_table_bk;
RENAME TABLE mantis_category_table TO mantis_category_table_bk;
RENAME TABLE mantis_bug_revision_table TO mantis_bug_revision_table_bk;
wmadmin
Posts: 45
Joined: 10 Jul 2009, 14:38

Re: Upgrade from 1.1.8 to 1.2.2 not so good

Post by wmadmin »

The tables were created with install.php and data are copied, but data in mantis_category_table slightly different

mantis_plugin_table = mantis_plugin_table_bk;
mantis_category_table ! mantis_category_table_bk;
mantis_bug_revision_table = mantis_bug_revision_table_bk;

mantis_category_table

Code: Select all

SELECT * FROM mantis_category_table;
386 rows fetched (47 ms)
mantis_category_table_bk

Code: Select all

SELECT * FROM mantis_category_table_bk;
348 rows fetched (46 ms)
So it should be ? Why ?

Or i should copy data from bk table ?

Code: Select all

RENAME TABLE mantis_category_table TO mantis_category_table_new;
CREATE TABLE mantis_category_table LIKE mantis_category_table_new;
INSERT mantis_category_table SELECT * FROM mantis_category_table_bk;
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Upgrade from 1.1.8 to 1.2.2 not so good

Post by atrol »

wmadmin wrote:

Code: Select all

SELECT * FROM mantis_category_table;
386 rows fetched (47 ms)
mantis_category_table_bk

Code: Select all

SELECT * FROM mantis_category_table_bk;
348 rows fetched (46 ms)
So it should be ? Why ?
Yes it could be because categories are migrated
Have a look at function install_category_migrate in file admin/install_functions.php to understand what is happening during update
Please use Search before posting and read the Manual
gnewtzie
Posts: 4
Joined: 01 Sep 2010, 15:31

Re: Upgrade from 1.1.8 to 1.2.2 not so good

Post by gnewtzie »

Still doesn't explain why my install isn't detecting that it's an upgrade during the db script part. It's still trying to do a create on the tables.
Post Reply