Trac upgrade

13 views
Skip to first unread message

Gordon McKinnon

unread,
Dec 4, 2024, 5:50:11 PMDec 4
to Trac Users
Hello,

I'm migrating a trac instance from Redhat 6 to Redhat 9.  Upgrading the mysql database from 5.1 to 8.0.36 was interesting, imported to 5.7, upgrade, mysqlsh, delete broken stuff, import to 8, update everything to use utfmb4 and innodb, backup, modify, delete, and restore the system table, but it seems to have worked out.

I'm trying to run TRAC 1.6 because I don't  want to compile python2 on redhat 9.  

I installed some components via rpm, and I did a pip install.  I also did an easy_install, so that might not be ideal, there are two tracd binaries and two trac_admins, but they are pretty similar.  Using either one I get:

2024-12-04 17:30:43,029 Trac[api] INFO: Need to upgrade database_version from 0 to 45
2024-12-04 17:30:43,029 Trac[env] WARNING: Component <Component trac.db.api.DatabaseManager> requires an environment upgrade
2024-12-04 17:30:43,068 Trac[api] INFO: Need to upgrade database_version from 0 to 45
2024-12-04 17:30:43,068 Trac[env] WARNING: Component <Component trac.db.api.DatabaseManager> requires an environment upgrade
2024-12-04 17:30:43,069 Trac[api] INFO: Need to upgrade database_version from 0 to 45
2024-12-04 17:30:47,841 Trac[env] INFO: upgrading <Component trac.db.api.DatabaseManager>...
2024-12-04 17:30:47,845 Trac[env] WARNING: Component <Component trac.db.api.DatabaseManager> failed with TracError: No upgrade module trac.upgrades.db1.py

I don't see any reference to that module anywhere.  Has anyone encountered this and resolved it?

Thank you,

Gordon

Jun Omae

unread,
Dec 4, 2024, 7:58:10 PMDec 4
to trac-...@googlegroups.com, gordo...@gmail.com
Hi,
It seems that your migrating MySQL database from 5.1 to 8.0.36 is wrong.

> 2024-12-04 17:30:43,029 Trac[api] INFO: Need to upgrade database_version from 0 to 45

The `0` is retrieved from `database_version` record in `system` table but the value is never `0`.

The following is from database for Trac 0.12.x
[[[
mysql> SELECT * FROM `system`;
+--------------------------+-------+
| name | value |
+--------------------------+-------+
| database_version | 26 |
| initial_database_version | 26 |
+--------------------------+-------+
2 rows in set (0.03 sec)
]]]

The value of `database_version` is depended on the Trac version:

[[[
| database_version
------------+------------------
Trac 0.12.x | 26
Trac 1.0.x | 29
Trac 1.2.x | 41
Trac 1.4.x | 45
Trac 1.6.x | 45
]]]

--
Jun Omae <jun...@gmail.com> (大前 潤)

Gordon McKinnon

unread,
Dec 5, 2024, 11:31:46 AMDec 5
to Trac Users
Hello,

Thank you.  I had dropped and recreated the system table as part of the process to get everything using utfmb4_bin, and I did not realize that the restore for the system table didn't restore anything.  I added the lines and the upgrade succeeded.

I'm very glad I asked.  I could have spent a very, very long time looking into that.

Thank you,

Gordon

Reply all
Reply to author
Forward
0 new messages