Hi,

On 2024/12/05 7:50, Gordon McKinnon wrote:
> 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

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 <[email protected]> (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/trac-users/d47e9f2f-3fff-46a3-9989-fcc2696a8412%40gmail.com.

Reply via email to