Database upgrade

Trying to upgrade RT with MySQL (actually MariaDB) from 3.8.7 to 4.2.0.
I’ve reached the database upgrade step and it starts correctly. But it
stops after reaching the upgrade to 3.9.3, with some errors reported on
3.9.2 as well. But before I try to resolve these errors, I’d like to
clarify a simple point. When does the old database get copied to the new
one?

RT 3.8.7 uses the database rt3; RT 4.2.0 uses rt4. As near as I can
tell, the upgrade script is essentially creating an empty database and
hasn’t made any modifications at all to rt3. Is this expected? Should
the database content be copied from rt3 to rt4 before all the schema
changes or after? What does that copy?
Dave Close

You should really read all the upgrading documentation.

Your point is described here:
http://www.bestpractical.com/docs/rt/4.2/UPGRADING-4.0.html#Common-issues

ChrisAm 13.11.2013 03:09, schrieb CLOSE Dave:

Trying to upgrade RT with MySQL (actually MariaDB) from 3.8.7 to 4.2.0.
I’ve reached the database upgrade step and it starts correctly. But it
stops after reaching the upgrade to 3.9.3, with some errors reported on
3.9.2 as well. But before I try to resolve these errors, I’d like to
clarify a simple point. When does the old database get copied to the new
one?

RT 3.8.7 uses the database rt3; RT 4.2.0 uses rt4. As near as I can
tell, the upgrade script is essentially creating an empty database and
hasn’t made any modifications at all to rt3. Is this expected? Should
the database content be copied from rt3 to rt4 before all the schema
changes or after? What does that copy?

I asked:

RT 3.8.7 uses the database rt3; RT 4.2.0 uses rt4. As near as I can
tell, the upgrade script is essentially creating an empty database and
hasn’t made any modifications at all to rt3. Is this expected? Should
the database content be copied from rt3 to rt4 before all the schema
changes or after? What does that copy?

Christian Loos replied:

You should really read all the upgrading documentation.
Your point is described here:
http://www.bestpractical.com/docs/rt/4.2/UPGRADING-4.0.html#Common-issues

Thank you. But don’t you find it astounding that there is no mention of
this requirement in the main upgrading document? It’s not as though this
is an “issue”; it is a fundamental step in the upgrade process. I think
I was justified in presuming that the main document specified /all/ the
necessary upgrade steps. But it turns out that it completely omits any
mention of renaming or reloading the database, instead reminding me
repeatedly to backup my database. That surely can be taken to imply that
the upgrade will alter the database. If the upgrade is not going to do
anything to the database, a backup is of less value.
Dave Close, Thales Avionics, Irvine California USA.
cell +1 949 394 2124, dave.close@us.thalesgroup.com

Thank you. But don’t you find it astounding that there is no mention of
this requirement in the main upgrading document? It’s not as though this
is an “issue”; it is a fundamental step in the upgrade process. I think
I was justified in presuming that the main document specified /all/ the
necessary upgrade steps. But it turns out that it completely omits any
mention of renaming or reloading the database, instead reminding me
repeatedly to backup my database. That surely can be taken to imply that
the upgrade will alter the database. If the upgrade is not going to do
anything to the database, a backup is of less value.

The ‘main document’ (called README) quite clearly states:

If you are upgrading from a previous version of RT, please review
the upgrade notes for the appropriate versions, which can be found
in docs/UPGRADING-* If you are coming from 3.8.6 to 4.0.x you should
review both the UPGRADING-3.8 and UPGRADING-4.0 file.  Similarly, if
you were coming from 3.6.7, you would want to review UPGRADING-3.6,
UPGRADING-3.8 and UPGRADING-4.0

It is particularly important that you read the warnings at the top of
UPGRADING-4.0 for some common issues.

-kevin