[mythtv] Duplicate column name 'stars'

John Patrick Poet john at BlueSkyTours.com
Sat Jul 10 21:20:10 EDT 2004


John Patrick Poet wrote:

>
> I decided to grab the latest CVS image.  Unfortunately Myth will not 
> startup now:
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Session management error: Authentication Rejected, reason : None of 
> the authentication protocols specified are supported and host-based 
> authentication failed
> 2004-07-10 18:53:40 Upgrading to schema version 1053
> DB Error (Performing database upgrade):
> Query was:
> ALTER TABLE recorded ADD COLUMN stars FLOAT UNSIGNED NOT NULL DEFAULT 0;
> Driver error was [2/1060]:
> QMYSQL3: Unable to execute query
> Database error was:
> Duplicate column name 'stars'
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> So, what is the safest way to fix this, without loosing my current 
> recorded shows?
>
> I can dive into the "Schema upgrade" code and probably figure out how 
> to get beyond this, but I was hoping for a quick fix.
>
> Thanks,
>
> John
>
>
Well I figured if there was a way to "ADD COLUMN" to a table, there is 
probably a way to remove a column.  After a quick google I discovered 
that the command was "DROP COLUMN".  I made a back up of my DB, then had 
to do:

mysql> ALTER TABLE recorded drop COLUMN stars;
Query OK, 19 rows affected (0.03 sec)
Records: 19  Duplicates: 0  Warnings: 0
 
mysql> ALTER TABLE recorded drop COLUMN previouslyshown;
Query OK, 19 rows affected (0.00 sec)
Records: 19  Duplicates: 0  Warnings: 0

To get Myth to start up.

John



More information about the mythtv-dev mailing list