[rt-users] Transitioning from RT 3.2.2 to RT 4.0.1 - problem updating the Schema

Ruslan Zakirov ruz at bestpractical.com
Wed Jul 20 21:12:17 EDT 2011


On Thu, Jul 21, 2011 at 4:40 AM, John P. Holcombe <JHolcombe at fisd.us> wrote:

[snip]

> 2. FTPd the rt3.sql dump to the RT4.0.1 server.
> 3. On the RT4.0.1 server, stopped Apache2.
> 4. Dropped the rt3 database: make dropdb
> 5. Imported the dump file: mysql --user=root --password={password} < rt3.sql

rt3.sql has NO instructions that create database. I suspect that you
didn't drop DB, dropped different DB and something like that. SQL dump
produced by mysql has code tha drops a table right before creating a
new one and filling it with data, but this only works for tables that
are in the dump. Tables that are not in the dump stay in the DB you
restore dump into. Error quoted below in this message supports this
theory.


Connect to mysql with the shell and make sure dbs are really dropped
or issue `drop database bla-bla;` right from the mysq shell. Instead
of creating database manually use sbin/rt-setup-database:

sbin/rt-setup-database --action create --...other options

For mysql you can as well run acl action:

sbin/rt-setup-database --action acl --datadir etc/ --...other options

Above commands create a new empty DB according to RT's config, but
without any tables and data. Restore dump into this DB.

> 6. Ran mysql -p and made sure the database "rt3" and the tables appeared, and they did.
> 7. Ran the schema updates, with 3.2.2 as the starting version, and 3.7.87 as the ending version (as stated in the documentation): /opt/rt4/sbin/rt-setup-database \ --prompt-for-dba-password --action upgrade
> 8. Get the following error when performing the schema updates:
>
> Processing 3.3.0
> Now populating database schema.
> DBD::mysql::st execute failed: Table 'ObjectCustomFieldValues' already exists at /opt/rt4/sbin/../lib/RT/Handle.pm line 517.
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list