dependent values schema - remove db-upgrade steps

John Mazzitelli mazz at redhat.com
Mon Jun 27 21:19:37 UTC 2011


Heiko,

I see that you renamed a table in the last db-upgrade step. But this was 
a table you just created within the last week or two IIRC.

I'm having dbsetup problems due to this - I can't dbsetup because the 
table was renamed, and well, there are issues if we remove tables from 
dbsetup - we need to flag these as obsoleted tables in the obsolete 
schema. However, we only use that for supported tables (things we 
released with) that we obsolete. Since this is a work in progress (and 
the "original" table won't exist in released version - in fact, it has 
only lived for a couple weeks!) we should not worry about it (i.e. we 
should not create db-upgrade steps to rename it)

What you should do is collapse all your db-upgrade steps into one. Don't 
worry about the renamed table, and just use the new table name (i.e. 
create the new table in db-upgrade and do not worry about renaming it)

This way, dbsetup/dbupgrade is simpler, more compact.

Yes, this means developers need to blow away their DB if they need the 
new stuff. So be it. That's what I am going to have to do anyway since 
this isn't working for me anyway. So I didn't gain anything no matter what.

It also makes it easier for you, you don't have to start creating crazy 
db-upgrade steps as you are developing this stuff.

And it makes it easier for the drift guys have have to merge master and 
keep getting conflicts in the db-upgrade and pom.xml :)


More information about the rhq-devel mailing list