[mythtv-users] upgrade database schema from 1224 to 1242 fails
Michael T. Dean
mtdean at thirdcontact.com
Tue Aug 25 05:27:52 UTC 2009
On 08/25/2009 12:59 AM, Kevin Johnson wrote:
> I recently tried upgrading to .22 using trunk because I had a few things that I thought an upgrade might help.
>
> Now i am in real trouble. I am using mythbuntu 9.04
>
> I installed all the packages. When I enter mythtv-setup, it want to upgrade. I choose okay and it kicks out and ask me if I want to run mythfilldatabase. Of couse that fails to.
> If I run mythbackend from the command line, this is the last part of the output.
>
> Please help.
>
> A database backup might be a good idea
> Are you sure you want to upgrade? [no] yes
> 2009-08-24 21:52:50.166 Newest Schema Version : 1242
> 2009-08-24 21:52:50.172 Upgrading to schema version 1225
> 2009-08-24 21:52:50.174 DB Error (Performing database upgrade):
> Query was: CREATE TABLE bad_people AS SELECT * FROM people;
> Error was: Driver error was [2/1050]:
> QMYSQL3: Unable to execute statement
> Database error was:
> Table 'bad_people' already exists
>
> new version: 1225
> 2009-08-24 21:52:50.174 Database Schema upgrade FAILED, unlocking.
> 2009-08-24 21:52:50.175 Couldn't upgrade database to new schema
> kevin at myth-backend:/var/log/mythtv$
That error is caused by the previous upgrade failure.
Any chance you have the log from the original upgrade?
If not, when Myth upgrades your database, it makes a database backup in
one of your DB Backups storage group directories. If you haven't
defined a DB Backups storage group, it will go into one of your Default
storage group directories. If you haven't defined a Default storage
group (i.e. you're upgrading from 0.19 or below), it goes in your
recordings directory. If none of the specified directories exist, it
goes in the /tmp directory (where helpful distros will often delete it
for you on reboot :( ).
Assuming you can find your pre-(any-)upgrade backup file, can you drop
your database, then do a full restore (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Database_Restore
and
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Full_restore_of_a_specific_backup_file
) of the database from before your upgrade (if you're upgrading from
0.21-fixes, you should find a "1214" database backup somewhere--i.e.
mythconverg_1214_20090825002638.sql.gz but with the date/time the backup
was made). If that errors, please post the log output from the upgrade
attempt.
Thanks,
Mike
More information about the mythtv-users
mailing list