[mythtv-users] Help Diseqc Trouble .21 - Database schema problems
Michael T. Dean
mtdean at thirdcontact.com
Tue May 6 08:13:58 UTC 2008
On 05/06/2008 03:23 AM, Dave Phillips wrote:
> Well I couldn't see anything in the log so I have attached it here.
> Please have a look when you get a chance.
Well, what I can tell you is that:
a) your database upgrade succeeded.
b) your database does not seem to be the problem.
The failing query:
> 2008-05-06 01:09:44.858 DB Error (DiSEqCDevSwitch::Store):
> Query was:
> INSERT INTO diseqc_tree ( parentid, ordinal, type,
> description, address, subtype, switch_ports,
> cmd_repeat )VALUES (NULL, 0, 'switch',
> 'Switch', 16, 'diseqc', 4, 1 )
> Driver error was [2/1054]:
> QMYSQL3: Unable to execute query
> Database error was:
> Unknown column 'address' in 'field list'
does not exist anywhere in MythTV 0.21. Therefore, the problem is
likely old library version somewhere on the system. Do you have 2
installations of Myth? Maybe an old pre-0.21 trunk install you compiled
into /usr/local and a new 0.21-fixes install from packages in /usr?
OK, nevermind. Just checked the history of the disecq_tree table, and
myth has never had an address column in there. You've got a Myth built
with http://svn.mythtv.org/trac/ticket/3787 but without the required
database update.
You can get what you need (for your currently installed Myth) with:
mysql -umythtv -p mythconverg
ALTER TABLE diseqc_tree ADD COLUMN address TINYINT(3) UNSIGNED NOT NULL
default 0 AFTER description;
UPDATE diseqc_tree SET address = 16 WHERE type = 'switch';
Note, though, that you will be running in a nonstandard configuration
and at the point where DiSEqC switch address selection is added to
MythTV in the future, you'll need to undo the change so that Myth will
be able to upgrade your database properly. (Something like, "ALTER
TABLE diseqc_tree DROP COLUMN address;") Then, you'll have to
reconfigure things.
If you don't need DiSEqC switch address selection, you should probably
find a standard build of MythTV, and then drop your database, restore
the pre-0.21 backup, and let it upgrade your DB.
Mike
More information about the mythtv-users
mailing list