[rt-users] Database Upgrade Errors -- Please Help

Jennifer I. Moore jim1 at cornell.edu
Mon Nov 21 11:04:39 EST 2005


Gentle Greetings,

We are in the process of upgrading from RT 3.0.0 to RT 3.4.4.  We have set 
up a new server with a fresh install of Apache (dynamic), MySQL, and RT, 
all located in a separate filesystem for RT.  I did a database dump from 
our production system and imported it into the new system.  Then I ran all 
of the needed database upgrade scripts.

There were errors on some of the database upgrade scripts, and data is 
clearly missing from the RT display in the web interface (for example, 
Custom Fields).  I have included the output from running the database 
scripts below.  Any help would be greatly appreciated.  I have searched the 
Wiki and mail list archives and found similar threads but no solutions.

Thank you in advance for any assistance!
Jennifer

--------

Here is information about the setup of our new server:

OS,Distribution -- Red Hat Enterprise Linux AS release 3 (Taroon Update 5) 
Linux hostname.edu 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 
i686 i686 i386 GNU/Linux
RT Version -- URL: svn://svn.bestpractical.com/rt/branches/3.4-RELEASE
     Repository UUID: e417ac7c-1bcc-0310-8ffa-8f5827389a85
     Revision: 4108
Perl Version -- v5.8.6 built for i686-linux
HTML::Mason -- 1.3101
DBIx::SearchBuilder Version -- 1.35
Apache Version -- Apache/1.3.33 (Unix) Server built:   Nov  3 2005 10:58:25
mod_perl Version -- 1.29
mod_ssl Version -- 2.8.22-1.3.33
MySQL Version -- ./mysql  Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i686)
C Compiler Version -- GNU cc 3.2.3 20030502 (Red Hat Linux 3.2.3-49)

Here is the output from running the database upgrade scripts:

[user at HOST ./rt-3.4.4/]>

[user at HOST ./rt-3.4.4/]> ls etc/upgrade/
3.1.0  3.1.15  3.1.17  3.3.0  3.3.11

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action schema --datadir 
etc/upgrade/3.1.0
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Creating database schema.
Problem with statement:


CREATE TABLE Attributes (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   Name varchar(255) NULL  ,
   Description varchar(255) NULL  ,
   Content text,
   ContentType varchar(16),
   ObjectType varchar(64),
   ObjectId integer,
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
   LastUpdatedBy integer NOT NULL DEFAULT 0  ,
   LastUpdated DATETIME NULL  ,
   PRIMARY KEY (id)
) TYPE=InnoDB
Table 'Attributes' already exists at 
/rt/apps/rt/rt-3.4.4/sbin/rt-setup-database line 205.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action acl --datadir 
etc/upgrade/3.1.0
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Done setting up database ACLs.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action insert --datadir 
etc/upgrade/3.1.0
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Done setting up database content.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action schema --datadir 
etc/upgrade/3.1.15
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Creating database schema.
Couldn't find schema file for mysql

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action acl --datadir 
etc/upgrade/3.1.15
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Couldn't find ACLS for mysql in etc/upgrade/3.1.15

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action insert --datadir 
etc/upgrade/3.1.15
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Creating scrips...127.done.
Done setting up database content.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action schema --datadir 
etc/upgrade/3.1.17
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Creating database schema.
Couldn't find schema file for mysql

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action acl --datadir 
etc/upgrade/3.1.17
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Couldn't find ACLS for mysql in etc/upgrade/3.1.17

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action insert --datadir 
etc/upgrade/3.1.17
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Creating ScripActions...18.19.done.
Creating ScripConditions...11.done.
Done setting up database content.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action schema --datadir 
etc/upgrade/3.3.0
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Creating database schema.
Problem with statement:
  alter Table Transactions ADD Column (ObjectType varchar(64) not null)
Duplicate column name 'ObjectType' at 
/rt/apps/rt/rt-3.4.4/sbin/rt-setup-database line 205.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action acl --datadir 
etc/upgrade/3.3.0
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Done setting up database ACLs.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action insert --datadir 
etc/upgrade/3.3.0
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Done setting up database content.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action schema --datadir 
etc/upgrade/3.3.11
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Creating database schema.
Problem with statement:
  ALTER TABLE ObjectCustomFieldValues ADD COLUMN SortOrder INTEGER NOT NULL 
DEFAULT 0
Duplicate column name 'SortOrder' at 
/rt/apps/rt/rt-3.4.4/sbin/rt-setup-database line 205.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action acl --datadir 
etc/upgrade/3.3.11
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Done setting up database ACLs.

[user at HOST ./rt-3.4.4/]> sudo /rt/apps/rt/rt-3.4.4/sbin/rt-setup-database 
--dba dbauser --prompt-for-dba-password --action insert --datadir 
etc/upgrade/3.3.11
In order to create or update your RT database,this script needs to connect 
to your mysql instance on localhost as dbauser.
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Done setting up database content.

[user at HOST ./rt-3.4.4/]> 





More information about the rt-users mailing list