FW: Issue upgrading to 4.2.x

I’m getting an error when doing upgrade-database on a 4.2 installation.

I am coming from 4.0.7 and I am able to successfully upgrade to 4.0.18 without error.

This is the message I’m getting after doing ‘make upgrade-database’ (highlighted below):

/usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database --action upgrade --prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to your mysql instance on localhost (port ‘’) as root
Please specify that user’s database password below. If the user has no database
password, just press return.

Password:
Working with:
Type: mysql
Host: localhost
Port:
Name: rt4
User: rt_user
DBA: root
Enter RT version you’re upgrading from: 4.0.18

Going to apply following upgrades:

  • 4.1.0
  • 4.1.1
  • 4.1.4
  • 4.1.5
  • 4.1.6
  • 4.1.7
  • 4.1.8
  • 4.1.9
  • 4.1.10
  • 4.1.11
  • 4.1.12
  • 4.1.13
  • 4.1.14
  • 4.1.15
  • 4.1.16
  • 4.1.17
  • 4.1.18
  • 4.1.19
  • 4.1.20
  • 4.1.21
  • 4.1.22
  • 4.1.23

Enter RT version if you want to stop upgrade at some point,
or leave it blank if you want apply above upgrades:

IT’S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
Processing 4.1.0
Now inserting data.
Processing 4.1.1
Now populating database schema.
[18504] [Wed Nov 20 17:27:58 2013] [critical]: DBD::mysql::st execute failed: Table ‘ObjectScrips’ already exists at /tmp/rt-4.2.0/sbin/…/lib/RT/Handle.pm line 526. (/tmp/rt-4.2.0/sbin/…/lib/RT.pm:391)
DBD::mysql::st execute failed: Table ‘ObjectScrips’ already exists at /tmp/rt-4.2.0/sbin/…/lib/RT/Handle.pm line 526.
make: *** [upgrade-database] Error 255

Any help/input would be greatly appreciated.

Adam Hutchins, Systems Administrator
Town of Kernersville, NC, USA
o-336.992.5456 m-336.529.7164

This email message, and any attachment(s) hereto, as well as any email message(s) that may be sent in response to it, may be considered Public Record, and as such are subject to requests for review. If you are not the intended recipient, please destroy this message and inform the sender immediately. The information contained in this email may be confidential and, in any event, is intended only for the use of the entity or individual to whom it is addressed. Thank you.

[18504] [Wed Nov 20 17:27:58 2013] [critical]: DBD::mysql::st execute
failed: Table ‘ObjectScrips’ already exists
at /tmp/rt-4.2.0/sbin/…/lib/RT/Handle.pm line 526.
(/tmp/rt-4.2.0/sbin/…/lib/RT.pm:391)

DBD::mysql::st execute failed: Table ‘ObjectScrips’ already exists
at /tmp/rt-4.2.0/sbin/…/lib/RT/Handle.pm line 526.

Have you tried to upgrade this RT instance previously? What extensions
are installed, or have been at some point?

  • Alex

Please keep all replies on-list.

I have upgraded it in the past from 3.x to 4.0.7. And I was successful
with 4.0.7 to 4.0.18 today. It’s the jump to 4.2.x that’s giving me
errors.

Did you attempt the 4.0 -> 4.2 upgrade at some earlier point?

I’m not using any extensions at this time.

Have you ever? RT has not, prior to RT 4.2, shipped an ObjectScrips
table, yet you are finding one – the question is how it got there.

Please show the output of:

mysql -u root rt4 -p -e “select Content from Attributes where Name = ‘UpgradeHistory’”

  • Alex

Please see my replies below.

Adam Hutchins, Systems Administrator
Town of Kernersville, NC, USA
o-336.992.5456 m-336.529.7164From: Alex Vandiver [mailto:alexmv@bestpractical.com]
Sent: Wednesday, November 20, 2013 2:28 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] FW: Issue upgrading to 4.2.x

Please keep all replies on-list.

I have upgraded it in the past from 3.x to 4.0.7. And I was successful
with 4.0.7 to 4.0.18 today. It’s the jump to 4.2.x that’s giving me
errors.

Did you attempt the 4.0 → 4.2 upgrade at some earlier point?
Not that I’m aware of.

I’m not using any extensions at this time.

Have you ever? RT has not, prior to RT 4.2, shipped an ObjectScrips table, yet you are finding one – the question is how it got there.
The only “extension” I think I have used in the past was the GD library for Charts… etc…

Please show the output of:

mysql -u root rt4 -p -e “select Content from Attributes where Name = ‘UpgradeHistory’”
It returns no output.

  • Alex

This email message, and any attachment(s) hereto, as well as any email message(s) that may be sent in response to it, may be considered Public Record, and as such are subject to requests for review. If you are not the intended recipient, please destroy this message and inform the sender immediately. The information contained in this email may be confidential and, in any event, is intended only for the use of the entity or individual to whom it is addressed. Thank you.

Did you attempt the 4.0 -> 4.2 upgrade at some earlier point?
Not that I’m aware of.

That’s extremely odd. Can you show the output of:
mysqldump -u root rt4 -p --no-data

  • Alex

– MySQL dump 10.13 Distrib 5.5.34, for debian-linux-gnu (x86_64)
– Host: localhost Database: rt4


– Server version 5.5.34-0ubuntu0.12.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/
!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/
!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/
!40101 SET NAMES utf8 /;
/
!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE /;
/
!40103 SET TIME_ZONE=‘+00:00’ /;
/
!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 /;
/
!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 /;
/
!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=‘NO_AUTO_VALUE_ON_ZERO’ /;
/
!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

– Table structure for table ACL

DROP TABLE IF EXISTS ACL;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ACL (
id int(11) NOT NULL AUTO_INCREMENT,
PrincipalType varchar(25) CHARACTER SET ascii NOT NULL,
PrincipalId int(11) NOT NULL,
RightName varchar(25) CHARACTER SET ascii NOT NULL,
ObjectType varchar(25) CHARACTER SET ascii NOT NULL,
ObjectId int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY ACL1 (RightName,ObjectType,ObjectId,PrincipalType,PrincipalId)
) ENGINE=InnoDB AUTO_INCREMENT=474 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Articles

DROP TABLE IF EXISTS Articles;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Articles (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(255) NOT NULL DEFAULT ‘’,
Summary varchar(255) NOT NULL DEFAULT ‘’,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Class int(11) NOT NULL DEFAULT ‘0’,
Parent int(11) NOT NULL DEFAULT ‘0’,
URI varchar(255) CHARACTER SET ascii DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Attachments

DROP TABLE IF EXISTS Attachments;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Attachments (
id int(11) NOT NULL AUTO_INCREMENT,
TransactionId int(11) NOT NULL,
Parent int(11) NOT NULL DEFAULT ‘0’,
MessageId varchar(160) CHARACTER SET ascii DEFAULT NULL,
Subject varchar(255) DEFAULT NULL,
Filename varchar(255) DEFAULT NULL,
ContentType varchar(80) CHARACTER SET ascii DEFAULT NULL,
ContentEncoding varchar(80) CHARACTER SET ascii DEFAULT NULL,
Content longblob,
Headers longtext,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY Attachments2 (TransactionId),
KEY Attachments3 (Parent,TransactionId)
) ENGINE=InnoDB AUTO_INCREMENT=81867 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Attributes

DROP TABLE IF EXISTS Attributes;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Attributes (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(255) DEFAULT NULL,
Description varchar(255) DEFAULT NULL,
Content longblob,
ContentType varchar(16) CHARACTER SET ascii DEFAULT NULL,
ObjectType varchar(64) CHARACTER SET ascii DEFAULT NULL,
ObjectId int(11) DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY Attributes1 (Name),
KEY Attributes2 (ObjectType,ObjectId)
) ENGINE=InnoDB AUTO_INCREMENT=24267 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table CachedGroupMembers

DROP TABLE IF EXISTS CachedGroupMembers;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE CachedGroupMembers (
id int(11) NOT NULL AUTO_INCREMENT,
GroupId int(11) DEFAULT NULL,
MemberId int(11) DEFAULT NULL,
Via int(11) DEFAULT NULL,
ImmediateParentId int(11) DEFAULT NULL,
Disabled smallint(6) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id),
KEY DisGrouMem (GroupId,MemberId,Disabled),
KEY CachedGroupMembers3 (MemberId,ImmediateParentId)
) ENGINE=InnoDB AUTO_INCREMENT=55986 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Classes

DROP TABLE IF EXISTS Classes;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Classes (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(255) NOT NULL DEFAULT ‘’,
Description varchar(255) NOT NULL DEFAULT ‘’,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Disabled int(2) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
HotList int(2) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table CustomFieldValues

DROP TABLE IF EXISTS CustomFieldValues;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE CustomFieldValues (
id int(11) NOT NULL AUTO_INCREMENT,
CustomField int(11) NOT NULL,
Name varchar(200) DEFAULT NULL,
Description varchar(255) DEFAULT NULL,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
Category varchar(255) DEFAULT NULL,
PRIMARY KEY (id),
KEY CustomFieldValues1 (CustomField)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table CustomFields

DROP TABLE IF EXISTS CustomFields;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE CustomFields (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(200) DEFAULT NULL,
Type varchar(200) CHARACTER SET ascii DEFAULT NULL,
MaxValues int(11) DEFAULT NULL,
Pattern text,
Repeated smallint(6) NOT NULL DEFAULT ‘0’,
Description varchar(255) DEFAULT NULL,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
LookupType varchar(255) CHARACTER SET ascii NOT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
Disabled smallint(6) NOT NULL DEFAULT ‘0’,
BasedOn int(11) DEFAULT NULL,
RenderType varchar(64) DEFAULT NULL,
ValuesClass varchar(64) CHARACTER SET ascii DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table FM_Articles

DROP TABLE IF EXISTS FM_Articles;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE FM_Articles (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(255) NOT NULL DEFAULT ‘’,
Summary varchar(255) NOT NULL DEFAULT ‘’,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Class int(11) NOT NULL DEFAULT ‘0’,
Parent int(11) NOT NULL DEFAULT ‘0’,
URI varchar(255) CHARACTER SET ascii DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table FM_Classes

DROP TABLE IF EXISTS FM_Classes;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE FM_Classes (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(255) NOT NULL DEFAULT ‘’,
Description varchar(255) NOT NULL DEFAULT ‘’,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Disabled int(2) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
HotList int(2) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table FM_ObjectTopics

DROP TABLE IF EXISTS FM_ObjectTopics;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE FM_ObjectTopics (
id int(11) NOT NULL AUTO_INCREMENT,
Topic int(11) NOT NULL DEFAULT ‘0’,
ObjectType varchar(64) CHARACTER SET ascii NOT NULL DEFAULT ‘’,
ObjectId int(11) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table FM_Topics

DROP TABLE IF EXISTS FM_Topics;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE FM_Topics (
id int(11) NOT NULL AUTO_INCREMENT,
Parent int(11) NOT NULL DEFAULT ‘0’,
Name varchar(255) NOT NULL DEFAULT ‘’,
Description varchar(255) NOT NULL DEFAULT ‘’,
ObjectType varchar(64) CHARACTER SET ascii NOT NULL DEFAULT ‘’,
ObjectId int(11) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table GroupMembers

DROP TABLE IF EXISTS GroupMembers;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE GroupMembers (
id int(11) NOT NULL AUTO_INCREMENT,
GroupId int(11) NOT NULL DEFAULT ‘0’,
MemberId int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY GroupMembers1 (GroupId,MemberId)
) ENGINE=InnoDB AUTO_INCREMENT=24270 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Groups

DROP TABLE IF EXISTS Groups;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Groups (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(200) DEFAULT NULL,
Description varchar(255) DEFAULT NULL,
Domain varchar(64) CHARACTER SET ascii DEFAULT NULL,
Type varchar(64) CHARACTER SET ascii DEFAULT NULL,
Instance int(11) DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY Groups1 (Domain,Instance,Type,id),
KEY Groups2 (Type,Instance)
) ENGINE=InnoDB AUTO_INCREMENT=31981 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Links

DROP TABLE IF EXISTS Links;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Links (
id int(11) NOT NULL AUTO_INCREMENT,
Base varchar(240) DEFAULT NULL,
Target varchar(240) DEFAULT NULL,
Type varchar(20) NOT NULL,
LocalTarget int(11) NOT NULL DEFAULT ‘0’,
LocalBase int(11) NOT NULL DEFAULT ‘0’,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY Links2 (Base,Type),
KEY Links3 (Target,Type),
KEY Links4 (Type,LocalBase)
) ENGINE=InnoDB AUTO_INCREMENT=772 DEFAULT CHARSET=ascii;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table ObjectClasses

DROP TABLE IF EXISTS ObjectClasses;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ObjectClasses (
id int(11) NOT NULL AUTO_INCREMENT,
Class int(11) NOT NULL DEFAULT ‘0’,
ObjectType varchar(255) CHARACTER SET ascii NOT NULL DEFAULT ‘’,
ObjectId int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table ObjectCustomFieldValues

DROP TABLE IF EXISTS ObjectCustomFieldValues;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ObjectCustomFieldValues (
id int(11) NOT NULL AUTO_INCREMENT,
CustomField int(11) NOT NULL,
ObjectType varchar(255) CHARACTER SET ascii NOT NULL,
ObjectId int(11) NOT NULL,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Content varchar(255) DEFAULT NULL,
LargeContent longblob,
ContentType varchar(80) CHARACTER SET ascii DEFAULT NULL,
ContentEncoding varchar(80) CHARACTER SET ascii DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
Disabled smallint(6) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id),
KEY ObjectCustomFieldValues1 (Content),
KEY ObjectCustomFieldValues2 (CustomField,ObjectType,ObjectId)
) ENGINE=InnoDB AUTO_INCREMENT=13536 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table ObjectCustomFields

DROP TABLE IF EXISTS ObjectCustomFields;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ObjectCustomFields (
id int(11) NOT NULL AUTO_INCREMENT,
CustomField int(11) NOT NULL,
ObjectId int(11) NOT NULL,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table ObjectScrips

DROP TABLE IF EXISTS ObjectScrips;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ObjectScrips (
id int(11) NOT NULL AUTO_INCREMENT,
Scrip int(11) NOT NULL,
Stage varchar(32) CHARACTER SET ascii NOT NULL DEFAULT ‘TransactionCreate’,
ObjectId int(11) NOT NULL,
SortOrder int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY ObjectScrips1 (ObjectId,Scrip)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table ObjectTopics

DROP TABLE IF EXISTS ObjectTopics;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ObjectTopics (
id int(11) NOT NULL AUTO_INCREMENT,
Topic int(11) NOT NULL DEFAULT ‘0’,
ObjectType varchar(64) CHARACTER SET ascii NOT NULL DEFAULT ‘’,
ObjectId int(11) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Principals

DROP TABLE IF EXISTS Principals;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Principals (
id int(11) NOT NULL AUTO_INCREMENT,
PrincipalType varchar(16) NOT NULL,
ObjectId int(11) DEFAULT NULL,
Disabled smallint(6) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id),
KEY Principals2 (ObjectId)
) ENGINE=InnoDB AUTO_INCREMENT=31981 DEFAULT CHARSET=ascii;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Queues

DROP TABLE IF EXISTS Queues;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Queues (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(200) NOT NULL,
Description varchar(255) DEFAULT NULL,
CorrespondAddress varchar(120) CHARACTER SET ascii DEFAULT NULL,
CommentAddress varchar(120) CHARACTER SET ascii DEFAULT NULL,
InitialPriority int(11) NOT NULL DEFAULT ‘0’,
FinalPriority int(11) NOT NULL DEFAULT ‘0’,
DefaultDueIn int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
Disabled smallint(6) NOT NULL DEFAULT ‘0’,
SubjectTag varchar(120) DEFAULT NULL,
Lifecycle varchar(32) DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY Queues1 (Name),
KEY Queues2 (Disabled)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table ScripActions

DROP TABLE IF EXISTS ScripActions;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ScripActions (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(200) DEFAULT NULL,
Description varchar(255) DEFAULT NULL,
ExecModule varchar(60) CHARACTER SET ascii DEFAULT NULL,
Argument varbinary(255) DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table ScripConditions

DROP TABLE IF EXISTS ScripConditions;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE ScripConditions (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(200) DEFAULT NULL,
Description varchar(255) DEFAULT NULL,
ExecModule varchar(60) CHARACTER SET ascii DEFAULT NULL,
Argument varbinary(255) DEFAULT NULL,
ApplicableTransTypes varchar(60) CHARACTER SET ascii DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Scrips

DROP TABLE IF EXISTS Scrips;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Scrips (
id int(11) NOT NULL AUTO_INCREMENT,
Description varchar(255) DEFAULT NULL,
ScripCondition int(11) NOT NULL DEFAULT ‘0’,
ScripAction int(11) NOT NULL DEFAULT ‘0’,
ConditionRules text,
ActionRules text,
CustomIsApplicableCode text,
CustomPrepareCode text,
CustomCommitCode text,
Stage varchar(32) CHARACTER SET ascii DEFAULT NULL,
Queue int(11) NOT NULL DEFAULT ‘0’,
Template int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Templates

DROP TABLE IF EXISTS Templates;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Templates (
id int(11) NOT NULL AUTO_INCREMENT,
Queue int(11) NOT NULL DEFAULT ‘0’,
Name varchar(200) NOT NULL,
Description varchar(255) DEFAULT NULL,
Type varchar(16) CHARACTER SET ascii DEFAULT NULL,
Language varchar(16) CHARACTER SET ascii DEFAULT NULL,
TranslationOf int(11) NOT NULL DEFAULT ‘0’,
Content text,
LastUpdated datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Tickets

DROP TABLE IF EXISTS Tickets;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Tickets (
id int(11) NOT NULL AUTO_INCREMENT,
EffectiveId int(11) NOT NULL DEFAULT ‘0’,
Queue int(11) NOT NULL DEFAULT ‘0’,
Type varchar(16) CHARACTER SET ascii DEFAULT NULL,
IssueStatement int(11) NOT NULL DEFAULT ‘0’,
Resolution int(11) NOT NULL DEFAULT ‘0’,
Owner int(11) NOT NULL DEFAULT ‘0’,
Subject varchar(200) DEFAULT ‘[no subject]’,
InitialPriority int(11) NOT NULL DEFAULT ‘0’,
FinalPriority int(11) NOT NULL DEFAULT ‘0’,
Priority int(11) NOT NULL DEFAULT ‘0’,
TimeEstimated int(11) NOT NULL DEFAULT ‘0’,
TimeWorked int(11) NOT NULL DEFAULT ‘0’,
Status varchar(64) DEFAULT NULL,
TimeLeft int(11) NOT NULL DEFAULT ‘0’,
Told datetime DEFAULT NULL,
Starts datetime DEFAULT NULL,
Started datetime DEFAULT NULL,
Due datetime DEFAULT NULL,
Resolved datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
Disabled smallint(6) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id),
KEY Tickets1 (Queue,Status),
KEY Tickets2 (Owner),
KEY Tickets6 (EffectiveId,Type)
) ENGINE=InnoDB AUTO_INCREMENT=7849 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Topics

DROP TABLE IF EXISTS Topics;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Topics (
id int(11) NOT NULL AUTO_INCREMENT,
Parent int(11) NOT NULL DEFAULT ‘0’,
Name varchar(255) NOT NULL DEFAULT ‘’,
Description varchar(255) NOT NULL DEFAULT ‘’,
ObjectType varchar(64) CHARACTER SET ascii NOT NULL DEFAULT ‘’,
ObjectId int(11) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Transactions

DROP TABLE IF EXISTS Transactions;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Transactions (
id int(11) NOT NULL AUTO_INCREMENT,
ObjectType varchar(64) CHARACTER SET ascii NOT NULL,
ObjectId int(11) NOT NULL DEFAULT ‘0’,
TimeTaken int(11) NOT NULL DEFAULT ‘0’,
Type varchar(20) CHARACTER SET ascii DEFAULT NULL,
Field varchar(40) CHARACTER SET ascii DEFAULT NULL,
OldValue varchar(255) DEFAULT NULL,
NewValue varchar(255) DEFAULT NULL,
ReferenceType varchar(255) CHARACTER SET ascii DEFAULT NULL,
OldReference int(11) DEFAULT NULL,
NewReference int(11) DEFAULT NULL,
Data varchar(255) DEFAULT NULL,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY Transactions1 (ObjectType,ObjectId)
) ENGINE=InnoDB AUTO_INCREMENT=126923 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table Users

DROP TABLE IF EXISTS Users;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE Users (
id int(11) NOT NULL AUTO_INCREMENT,
Name varchar(200) NOT NULL,
Password varchar(256) DEFAULT NULL,
Comments text,
Signature text,
EmailAddress varchar(120) DEFAULT NULL,
FreeformContactInfo text,
Organization varchar(200) DEFAULT NULL,
RealName varchar(120) DEFAULT NULL,
NickName varchar(16) DEFAULT NULL,
Lang varchar(16) DEFAULT NULL,
EmailEncoding varchar(16) DEFAULT NULL,
WebEncoding varchar(16) DEFAULT NULL,
ExternalContactInfoId varchar(100) DEFAULT NULL,
ContactInfoSystem varchar(30) DEFAULT NULL,
ExternalAuthId varchar(100) DEFAULT NULL,
AuthSystem varchar(30) DEFAULT NULL,
Gecos varchar(16) DEFAULT NULL,
HomePhone varchar(30) DEFAULT NULL,
WorkPhone varchar(30) DEFAULT NULL,
MobilePhone varchar(30) DEFAULT NULL,
PagerPhone varchar(30) DEFAULT NULL,
Address1 varchar(200) DEFAULT NULL,
Address2 varchar(200) DEFAULT NULL,
City varchar(100) DEFAULT NULL,
State varchar(100) DEFAULT NULL,
Zip varchar(16) DEFAULT NULL,
Country varchar(50) DEFAULT NULL,
Timezone varchar(50) DEFAULT NULL,
PGPKey text,
Creator int(11) NOT NULL DEFAULT ‘0’,
Created datetime DEFAULT NULL,
LastUpdatedBy int(11) NOT NULL DEFAULT ‘0’,
LastUpdated datetime DEFAULT NULL,
AuthToken varchar(16) CHARACTER SET ascii DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY Users1 (Name),
KEY Users4 (EmailAddress)
) ENGINE=InnoDB AUTO_INCREMENT=31908 DEFAULT CHARSET=utf8;
/
!40101 SET character_set_client = @saved_cs_client */;

– Table structure for table sessions

DROP TABLE IF EXISTS sessions;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE sessions (
id char(32) NOT NULL,
a_session longblob,
LastUpdated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=ascii;
/
!40101 SET character_set_client = @saved_cs_client /;
/
!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE /;
/
!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS /;
/
!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS /;
/
!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /;
/
!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
/
!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION /;
/
!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

– Dump completed on 2013-11-20 14:45:47

Adam Hutchins, Systems Administrator
Town of Kernersville, NC, USA
o-336.992.5456 m-336.529.7164-----Original Message-----
From: Alex Vandiver [mailto:alexmv@bestpractical.com]
Sent: Wednesday, November 20, 2013 2:45 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] FW: Issue upgrading to 4.2.x

On Wed, 2013-11-20 at 14:34 -0500, Adam Hutchins wrote:

Did you attempt the 4.0 → 4.2 upgrade at some earlier point?
Not that I’m aware of.

That’s extremely odd. Can you show the output of:
mysqldump -u root rt4 -p --no-data

  • Alex

This email message, and any attachment(s) hereto, as well as any email message(s) that may be sent in response to it, may be considered Public Record, and as such are subject to requests for review. If you are not the intended recipient, please destroy this message and inform the sender immediately. The information contained in this email may be confidential and, in any event, is intended only for the use of the entity or individual to whom it is addressed. Thank you.

Did you attempt the 4.0 -> 4.2 upgrade at some earlier point?
Not that I’m aware of.

That’s extremely odd. Can you show the output of:
mysqldump -u root rt4 -p --no-data

This dump confirms that you either ran ‘make initdb’, or did a test
upgrade, and did not drop the database before re-importing your backup.
This results in some 4.2 tables still existing, with 4.0 schemas and
data in the remainder of the database.

Running:

mysql -u root -p rt4 -e ‘drop table ObjectScrips’

…should suffice to remove the extraneous table, and allow ‘make
upgrade-database’ to complete.

  • Alex

That worked! Thank you very much for your help!

Adam Hutchins, Systems Administrator
Town of Kernersville, NC, USA
o-336.992.5456 m-336.529.7164-----Original Message-----
From: Alex Vandiver [mailto:alexmv@bestpractical.com]
Sent: Wednesday, November 20, 2013 3:05 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] FW: Issue upgrading to 4.2.x

On Wed, 2013-11-20 at 14:46 -0500, Adam Hutchins wrote:

On Wed, 2013-11-20 at 14:34 -0500, Adam Hutchins wrote:

Did you attempt the 4.0 → 4.2 upgrade at some earlier point?
Not that I’m aware of.

That’s extremely odd. Can you show the output of:
mysqldump -u root rt4 -p --no-data

This dump confirms that you either ran ‘make initdb’, or did a test upgrade, and did not drop the database before re-importing your backup.
This results in some 4.2 tables still existing, with 4.0 schemas and data in the remainder of the database.

Running:

mysql -u root -p rt4 -e ‘drop table ObjectScrips’

…should suffice to remove the extraneous table, and allow ‘make upgrade-database’ to complete.

  • Alex

This email message, and any attachment(s) hereto, as well as any email message(s) that may be sent in response to it, may be considered Public Record, and as such are subject to requests for review. If you are not the intended recipient, please destroy this message and inform the sender immediately. The information contained in this email may be confidential and, in any event, is intended only for the use of the entity or individual to whom it is addressed. Thank you.