Re: [Trac] upgrade from 0.12 -> 1.0 : OperationalError: no such table: cache

141 views
Skip to first unread message

Steffen Hoffmann

unread,
Oct 31, 2012, 4:50:39 PM10/31/12
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 31.10.2012 16:54, Richard Musil wrote:
> I have made recently upgrade to 1.0 together with few projects. All
> projects upgraded fine except one, which I interrupted in update
> process. Now, whenever I try to do
>
> trac-admin <project> upgrade
>
> I receive error:
>
> The upgrade failed. Please fix the issue and try again.
> OperationalError: no such table: cache
>
> Does anyone know, how I could "fix the issue"?

After being that * to stop a running db upgrade process, be prepared for
some hard work.

Least-cost route: Redo with another copy of your backup of that Trac
environment. But I fear you don't have one, or you probably wouldn�t
have asked that question here, right? (I wonder, if it is partly related
to Trac's reliability, that people just run for upgrades and other
modifications without a backup.)

Everything else will get a lot harder. Just some thoughts:

I can hardly guess, when exactly you interrupted the upgrade procedure.
Detect the current db schema revision number (from Trac db table
'system'). Search the corresponding schema in the history of
'db_default' and compare it to the current state of your db. You should
find out everything about the missing table and re-add it with
appropriate definitions to relaunch the upgrade from there.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlCRjxoACgkQ31DJeiZFuHeG4ACgzDkbRNWoGgzDEpcjne+8FRXH
X0wAn1D1J/mrBPRt086ZCkO1aGr/CVvn
=R/vU
-----END PGP SIGNATURE-----

Richard Musil

unread,
Nov 5, 2012, 10:32:49 AM11/5/12
to trac-...@googlegroups.com
So, after so many years I have been told that the databases are transactional, I am facing corruption, simply due to my interruption :).
But you actually made a good point, because I realized I do have a backup, so restoring and re-running the upgrade solved the problem (and saved my day).
Thanks.

RjOllos

unread,
Nov 5, 2012, 11:01:12 AM11/5/12
to trac-...@googlegroups.com
On Monday, November 5, 2012 7:32:49 AM UTC-8, Richard Musil wrote:
So, after so many years I have been told that the databases are transactional, I am facing corruption, simply due to my interruption :).

I suppose the behavior you saw must be because `db.commit()` is called after every upgrade:
Reply all
Reply to author
Forward
0 new messages