[mythtv-users] Re: Clean 0.15 install, what should I save from
the old DB?
Aleaxander
alex at carbonated.com
Sun Jun 6 15:42:14 EDT 2004
Bruce Markey wrote:
> Aleaxander wrote:
>
>> Bruce Markey wrote:
>>
>>>> ----
>>>>
>>>> Everything looked good until I did the last step, and then received
>>>> the following error:
>>>>
>>>> ERROR 1054 at line 1: Unknown column 'recorddups' in 'field list'
>>>>
>>>> Looking at a backup of the 0.15 mythconverg database I made before I
>>>> started trying to restore information from the 0.14 database I see
>>>> that there is no recorddups field present. Anyone have any idea
>>>> what I am doing wrong or suggestions on how I can proceed?
>>>
>>>
>>>
>>>
>>> That column was dropped and replaced with two other columns.
>>>
>>> ALTER TABLE record ADD COLUMN recorddups INT DEFAULT 0 NOT NULL;
>>>
>>> Run the restore command again then:
>>>
>>> UPDATE record SET dupmethod = 1 WHERE recorddups = 2;
>>> UPDATE record SET dupin = 2 WHERE recorddups = 1;
>>> ALTER TABLE record DROP COLUMN recorddups;
>>>
>>> -- bjm
>>
>>
>>
>> Still running into problems. I restored mythconverg from a backup
>> made of 0.15, deleted the restore.sql file I had created earlier and
>> started over, just in case I had messed something up in previous
>> attempts, then followed the instructions again, as I understand them,
>> doing:
>>
>> $ grep "INSERT INTO record " mythtv_backup.sql > restore.sql
>> $ grep "INSERT INTO recorded " mythtv_backup.sql >> restore.sql
>> $ grep "INSERT INTO oldrecorded " mythtv_backup.sql >> restore.sql
>> $ grep "INSERT INTO recordedmarkup " mythtv_backup.sql >> restore.sql
>> $ mysql -u root -p mythconverg
>> mysql> ALTER TABLE record ADD COLUMN recorddups INT DEFAULT 0 NOT NULL;
>> mysql> exit
>> $ mysql -u mythtv -pmythtv mythconverg < restore.sql
>>
>> Then got this error:
>> ERROR 1054 at line 1: Unknown column 'preroll' in field list'
>>
>> Doh! Okay, so I did the following:
>> mysql> ALTER TABLE record ADD COLUMN preroll INT DEFAULT 0 NOT NULL;
>> mysql> exit
>> $ mysql -u mythtv -pmythtv mythconverg < restore.sql
>>
>> Then got this error (at this point I know I'm probably going down the
>> path of messing up the database, but I'm desperate):
>> ERROR 1054 at line 1: Unknown column 'postroll' in field list'
>>
>> Doh! Doh! How many fields am I missing? This can't be good, but I
>> keep going doing knowing that I'm probably destroying the database:
>> mysql> ALTER TABLE record ADD COLUMN postroll INT DEFAULT 0 NOT NULL;
>> mysql> exit
>> $ mysql -u mythtv -pmythtv mythconverg < restore.sql
>>
>> At which point I get this error:
>> ERROR 1048 at line 1: Column 'subtitle' cannot be null
>>
>> I'm wondering if because I've started with fresh and unused 0.15
>> database, are there fields that have not yet been created by Mythtv?
>> I'm stuck at this point and would really appreciate any help or a push
>> in the right direction. I'm desperate!
>
>
> Well, you are certainly making a gallant effort. The "preroll"
> and "postroll" fields were renamed "startoffset" and "endoffset".
> Several fields no longer allow NULL so the INSERT statements should
> now have "''" in place of "NULL". You could try editing your
> restore file to search and replace for each of these but then
> it would likely reveal the next difference.
>
> Here is what I think is your best bet to get back on track.
>
> 1) Temporarily reinstall 0.14, the version you were running when
> you made the backup (but don't run it yet).
>
> 2) empty your db:
>
> $ mysql -u mythtv -pmythtv mythconverg
> mysql> drop database mythconverg;
> mysql> create database mythconverg;
>
> 3) Run the 0.14 version of ./setup/setup . Let it do the database
> updates then you should exit without doing any of the configuration.
>
> 4) You should now have a database schema that matches the backup
> data. Now do your restore:
>
> $ mysql -u mythtv -pmythtv mythconverg < restore.sql
>
> Hopefully this will run without errors since the tables and columns
> match.
>
> 5) Install 0.15.1 . Run the 0.15.1 version of ./setup/setup . Let
> it do the database updates. If all goes well, do the configuration
> for General, Capture cards, Video sources, and Input connections.
> Run mythfilldatabase then start mythbackend.
>
> 6) Start mythfrontend and go to TV->Watch Recordings to verify that
> your recordings are listed.
>
> 7) If it's all good, go to Setup->TV Settings and go through each
> page to complete your configuration.
>
> -- bjm
I'm not sure that I can reinstall 0.14 because I installed 0.15 on a
reformatted system (my initial upgrade to 0.15 from 0.14 did not go
well, and after I had pretty much backed myself into a corner, I decided
to start from scratch) using Jarod's guide and Axel's .rpm's, and when I
look at the .rpm's that seem to be current available, only 0.15-71 seems
to there.
I guess I'll have to try doing this one step at a time if I want to
preserve the data in my old database. If anyone else has any
suggestions, knows which other fields have changed, then I'd very much
appreciate your guidance.
-Alex
More information about the mythtv-users
mailing list