Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

why change db stuff with every version change?

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


evuraan at gmail

Nov 25, 2009, 12:08 AM

Post #1 of 15 (1451 views)
Permalink
why change db stuff with every version change?

<snip>
.22 frontends will not work with .21 backends
This version of MythTV requires an updated database.(schema is 30
versions behind)
</snip>

sounds too familiar, I had to tear down my db & rebuild when i came
from previous versions to 0.21 and seems the cycle repeats again.
which makes wonder, why are we doing this to ourselves?

why cant we leave the db schema as it is?

now if you have solid reasons to convince that changes in db schema
with every version change is good evolution supported by good reasons,
pls treat this as a silly rant.

or at least, provide some sort of backward compatibiity so that the
precious db of yester years continues to be of use with upstream
versions w/o having to redo the db that'd be swell.

(yes, I probably can dump the tables & rebuild the db to the new
schema if i stfw, but i'd happier if i did not have to)

/end of rant.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


myth at robinhill

Nov 25, 2009, 1:11 AM

Post #2 of 15 (1416 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

On Wed Nov 25, 2009 at 12:08:39AM -0800, Evuraan wrote:

> <snip>
> .22 frontends will not work with .21 backends
> This version of MythTV requires an updated database.(schema is 30
> versions behind)
> </snip>
>
> sounds too familiar, I had to tear down my db & rebuild when i came
> from previous versions to 0.21 and seems the cycle repeats again.
> which makes wonder, why are we doing this to ourselves?
>
Not sure what you mean - there's no need to "tear down the db" at all
(unless you've corrupted it previously). The backend/setup programs
will update the schema automatically to the new one (as did previous
version updates).

> why cant we leave the db schema as it is?
>
Beacuse new functionality needs backend support. Extra tables are
required for storage groups for example.

> now if you have solid reasons to convince that changes in db schema
> with every version change is good evolution supported by good reasons,
> pls treat this as a silly rant.
>
> or at least, provide some sort of backward compatibiity so that the
> precious db of yester years continues to be of use with upstream
> versions w/o having to redo the db that'd be swell.
>
This is a major maintenance problem - backward compatibility requires a
huge amount of complicated logic, workarounds, etc. which will increase
the likelihood of issues.

What's preventing you updating all the backends/frontends anyway? It's
not like there's embedded systems which will need replacing at large
cost, it's just a software update.

Cheers,
Robin
--
___
( ' } | Robin Hill <myth [at] robinhill> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |


greg at phaze

Nov 25, 2009, 3:43 AM

Post #3 of 15 (1420 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

> sounds too familiar, I had to tear down my db & rebuild when i came
> from previous versions to 0.21 and seems the cycle repeats again.
> which makes wonder, why are we doing this to ourselves?


Why in the world would you have to do that ? I've been using the VERY same mysql DB since version 0.12 or so.

As long as you aren't manually mucking around and changing the schema then myth should update it for you as needed.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jon.the.wise.gdrive at gmail

Nov 25, 2009, 4:41 AM

Post #4 of 15 (1414 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

On Nov 25, 2009, at 3:43 AM, Greg Estabrooks wrote:

>> sounds too familiar, I had to tear down my db & rebuild when i came
>> from previous versions to 0.21 and seems the cycle repeats again.
>> which makes wonder, why are we doing this to ourselves?
>
>
> Why in the world would you have to do that ? I've been using the
> VERY same mysql DB since version 0.12 or so.
>
> As long as you aren't manually mucking around and changing the
> schema then myth should update it for you as needed.

Agreed, mine is from 0.18, and has lived on 3 different backend
systems. Things you might want to remember: nightly backup and
optimization. I keep 7 days of backups (named for the day of the week)
and *if* my upgrade goes south, I can roll back to the most current
backup. The last time I had trouble with an update was from 0.18 to
0.19, and it may have been self inflicted, but wasn't due to DB schema
updates, rather it was lirc and bttv issues with the kernel.

~Jon


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 25, 2009, 5:46 AM

Post #5 of 15 (1414 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

On 11/25/2009 03:08 AM, Evuraan wrote:
> <snip>
> .22 frontends will not work with .21 backends
> This version of MythTV requires an updated database.(schema is 30
> versions behind)
> </snip>
>
> sounds too familiar, I had to tear down my db & rebuild when i came
> from previous versions to 0.21 and seems the cycle repeats again.
> which makes wonder, why are we doing this to ourselves?
>
> why cant we leave the db schema as it is?
>
> now if you have solid reasons to convince that changes in db schema
> with every version change is good evolution supported by good reasons,
> pls treat this as a silly rant.
>
> or at least, provide some sort of backward compatibiity so that the
> precious db of yester years continues to be of use with upstream
> versions w/o having to redo the db that'd be swell.
>

What you want is forwards compatibility, not backwards compatibility.

Backwards compatibility would allow you to run MythTV 0.10 using a 0.22
database schema (or MythTV 0.21-fixes with a 0.22-fixes database
schema). There's /absolutely/ no reason to allow this, so it's not
supported.

Forwards compatibility, on the other hand, allows you to start with a
MythTV 0.15 database and upgrade to a 0.22 database schema. As Greg
mentioned, this /is/ supported.

Note that MythTV 0.22 requires that your database schema be version 0.15
or greater, which, IMHO, is far more prior versions than it needs to
support. If you have an earlier database schema (meaning you've been
using a version of MythTV earlier than 0.15--using a version that's 6
years old or more), you'll just have to do "incremental" upgrades by
installing intermediate versions and updating. Since I doubt anyone out
there actually has such old versions running, this is definitely not a
problem.

> (yes, I probably can dump the tables & rebuild the db to the new
> schema if i stfw, but i'd happier if i did not have to)

Then be happy.

Other points to note: only mythtv-setup and mythbackend can upgrade the
MythTV TV database schema. Only plugins can upgrade the plugin schema.

So, to upgrade, you must:

a) Shut down all running (old-version) MythTV processes (mythbackend,
mythfrontend, mythcommflag, mythtranscode, and mythtv-setup).
b) Make a database backup (
http://www.mythtv.org/wiki/Database_Backup_and_Restore ) for your own
peace of mind
c) Start mythtv-setup from the new MythTV version and answer the
questions/wait until it finishes upgrading your database
d) Start mythbackend on the master backend host
e) Start mythfrontend on a single host and let it upgrade your plugin
database versions (answering the questions and waiting until it finishes)
f) Start other mythbackend and mythfrontend processes on other hosts as
desired

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


chris at westnet

Nov 25, 2009, 6:11 AM

Post #6 of 15 (1404 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

On Wed, 25 Nov 2009, Michael T. Dean wrote:

> Other points to note: only mythtv-setup and mythbackend can upgrade the MythTV
> TV database schema. Only plugins can upgrade the plugin schema.

That's odd. When I ran my test upgrade, I only restarted mythbackend. When I
started the frontend, I received a message that it wanted to upgrade the
database, with an OK / Cancel prompt. The impression I got was that the
upgrade was going to happen at that time.


==========================================================
Chris Candreva -- chris [at] westnet -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


greg at phaze

Nov 25, 2009, 7:16 AM

Post #7 of 15 (1397 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

> > Other points to note: only mythtv-setup and mythbackend can upgrade the MythTV
> > TV database schema. Only plugins can upgrade the plugin schema.
>
> That's odd. When I ran my test upgrade, I only restarted mythbackend. When I
> started the frontend, I received a message that it wanted to upgrade the
> database, with an OK / Cancel prompt. The impression I got was that the
> upgrade was going to happen at that time.


That's a different update. The TV database schema is handled by the backend/setup. The upgrade the FE prompted you for would have been one of the plugins wanting to update it's portion of the database :)

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


drescherjm at gmail

Nov 25, 2009, 7:29 AM

Post #8 of 15 (1400 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

> <snip>
> .22 frontends will not work with .21 backends
> This version of MythTV requires an updated database.(schema is 30
> versions behind)
> </snip>
>
> sounds too  familiar, I had to tear down my db & rebuild when i came
> from previous versions to 0.21 and seems the cycle repeats again.
> which makes wonder, why are we doing this to ourselves?
>

I am confused. These sound as two different issues. Actually I have
never seen the second issue going from mythtv 0.16 to 0.17 to 0.18 to
0.19 to 0.20 to 0.21. In all cases the switch was an inplace upgrade
meaning I upgraded the software on the same machine as the old version
and then started the backend and frontends and mythtv performed the
upgrade. I have never coupled upgrading mythtv with a new os install
or new machine so I do not know if that makes any difference.

As for the other issue (.22 frontends will not work with .21
backends). It's more difficult from a programming standpoint. How does
a new frontend store a new type of value not needed in previous
versions of mythtv in the database if it can not add or modify tables.
Fixing the schema will hinder adding new features or cause these new
features to have to store their data in some other place.

John
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 25, 2009, 10:38 AM

Post #9 of 15 (1383 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

On 11/25/2009 10:16 AM, Greg Estabrooks wrote:
>>> Other points to note: only mythtv-setup and mythbackend can upgrade the MythTV
>>> TV database schema. Only plugins can upgrade the plugin schema.
>>>
>> That's odd. When I ran my test upgrade, I only restarted mythbackend. When I
>> started the frontend, I received a message that it wanted to upgrade the
>> database, with an OK / Cancel prompt. The impression I got was that the
>> upgrade was going to happen at that time.
> That's a different update. The TV database schema is handled by the backend/setup. The upgrade the FE prompted you for would have been one of the plugins wanting to update it's portion of the database :)

Right. Specifically it was either the MythMusic or the MythVideo
upgrades--the only two plugin upgrades that prompt you, yet.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


DEPontius at edgehp

Nov 25, 2009, 12:53 PM

Post #10 of 15 (1390 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

Robin Hill wrote:
<snip>
> What's preventing you updating all the backends/frontends anyway? It's
> not like there's embedded systems which will need replacing at large
> cost, it's just a software update.
>
Most of my Myth machines are Gentoo, But there are 2 Ubuntu machines in
the house. As far as I can tell, neither has released 0.22 to "stable"
yet, but I've no doubt that they will do so at different times. As of
now, I just plan to have some time when the Ubuntu machines can't run
the Myth frontend.

I don't see that as a big problem, just a minor annoyance.

Right now I'm far more concerned about the database conversion. At
various times I've come across Gentoo messages telling me to do this or
that to my database and/or /etc/mysql/my.cnf. I know that at least once
I've had to drop and reload the database. Right now I'm fearing that
I've got a bad case of "partial corruption", as some have put it, and
that it won't show up until the first time I fire up 0.22.

Dale
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


anothersname at googlemail

Nov 25, 2009, 2:51 PM

Post #11 of 15 (1379 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

2009/11/25 Dale Pontius <DEPontius [at] edgehp>:
> Robin Hill wrote:
> <snip>
>> What's preventing you updating all the backends/frontends anyway?  It's
>> not like there's embedded systems which will need replacing at large
>> cost, it's just a software update.
>>
> Most of my Myth machines are Gentoo, But there are 2 Ubuntu machines in
> the house.  As far as I can tell, neither has released 0.22 to "stable"
> yet, but I've no doubt that they will do so at different times.  As of
> now, I just plan to have some time when the Ubuntu machines can't run
> the Myth frontend.
>
> I don't see that as a big problem, just a minor annoyance.
>
> Right now I'm far more concerned about the database conversion.  At
> various times I've come across Gentoo messages telling me to do this or
> that to my database and/or /etc/mysql/my.cnf.  I know that at least once
> I've had to drop and reload the database.  Right now I'm fearing that
> I've got a bad case of "partial corruption", as  some have put it, and
> that it won't show up until the first time I fire up 0.22.
>
> Dale
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

I just had a look at the wiki and the db scema there seems to be out of date?

http://www.mythtv.org/wiki/Category:DB_Table

for example my DB includes a table eit_cache that I can't find
documentation for.

The reason I'm looking is I'm trying to understand where in the DB the
'Full' list of upcoming programs is stored and what information is
stored on each one (for example is programid stored for each program
in the upcoming listings? and if so where can I find that info in the
DB?)

Any pointers would be gratefully received.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


evuraan at gmail

Nov 25, 2009, 5:08 PM

Post #12 of 15 (1369 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

Like Dale, I also have multiple frontends and one just b/e. And one of
the F/E went with karmic koala (ubuntu 9.10, 0.22) and it can no
longer work with my hardy (8.04) backend since my b/e is 0.21.

an annoyance indeed.

i am not yet ready to upgrade my backend, and my other f/e clients to 0.22.

i am not sure whether i can bring just the b/e db schema upto the
"mark for 0.22 f/e client" while leaving the ver as it is at 0.21. is
this even possible? any guidance will be appreciated. (pls note, i
will have 0.21, 0.22 f/e clients)



2009/11/25 Dale Pontius <DEPontius [at] edgehp>:
> Robin Hill wrote:
> <snip>
>> What's preventing you updating all the backends/frontends anyway?  It's
>> not like there's embedded systems which will need replacing at large
>> cost, it's just a software update.
>>
> Most of my Myth machines are Gentoo, But there are 2 Ubuntu machines in
> the house.  As far as I can tell, neither has released 0.22 to "stable"
> yet, but I've no doubt that they will do so at different times.  As of
> now, I just plan to have some time when the Ubuntu machines can't run
> the Myth frontend.
>
> I don't see that as a big problem, just a minor annoyance.
>
> Right now I'm far more concerned about the database conversion.  At
> various times I've come across Gentoo messages telling me to do this or
> that to my database and/or /etc/mysql/my.cnf.  I know that at least once
> I've had to drop and reload the database.  Right now I'm fearing that
> I've got a bad case of "partial corruption", as  some have put it, and
> that it won't show up until the first time I fire up 0.22.
>
> Dale
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jarpublic at gmail

Nov 25, 2009, 5:45 PM

Post #13 of 15 (1363 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

> Like Dale, I also have multiple frontends and one just b/e. And one of
> the F/E went with karmic koala (ubuntu 9.10, 0.22) and it can no
> longer work with my hardy (8.04) backend since my b/e is 0.21.
>
> an annoyance indeed.
>
> i am not yet ready to upgrade my backend, and my other f/e clients to 0.22.
>
> i am not sure whether i can bring just the b/e db schema upto the
> "mark for 0.22 f/e client" while leaving the ver as it is at 0.21. is
> this even possible? any guidance will be appreciated. (pls note, i
> will have 0.21, 0.22  f/e clients)

Are you guys serious? You want the devs to spend their time figuring
out how to ensure interoperability between major revisions and then
write all the necessary code so that you can do a partial upgrade?
This is ridiculous. If you don't want to upgrade, then don't upgrade
anything. If you want to upgrade then upgrade everything. But
expecting the devs to make sure you can shoehorn a .22 frontend into
working with an older backend is unreasonable. The requirements are
not made arbitrarily. They aren't just incrementing a number. The
database is actually different. The code changed, that is why it is a
new version. The new features require changes in the way the machines
communicate and the way they store data. For much of this there simply
isn't a counterpart in .21.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


knowledgejunkie at gmail

Nov 25, 2009, 6:24 PM

Post #14 of 15 (1357 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

2009/11/26 Evuraan <evuraan [at] gmail>:
> Like Dale, I also have multiple frontends and one just b/e. And one of
> the F/E went with karmic koala (ubuntu 9.10, 0.22) and it can no
> longer work with my hardy (8.04) backend since my b/e is 0.21.
>
> an annoyance indeed.

Indeed. Please don't top-post.

Searching suggests you should be able to install MythTV 0.21 from a
jaunty repo after removing the 0.22 packages.

Cheers,
Nick

--
Nick Morrott

MythTV Official wiki: http://mythtv.org/wiki/
MythTV users list archive: http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


evuraan at gmail

Nov 25, 2009, 7:49 PM

Post #15 of 15 (1362 views)
Permalink
Re: why change db stuff with every version change? [In reply to]

>
> Searching suggests you should be able to install MythTV 0.21 from a
> jaunty repo after removing the 0.22 packages.

yep that helped. thx.


>
> Cheers,
> Nick
>
> --
> Nick Morrott
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.