[Dbconfig-common-devel] Upgrade scripts

Cameron Dale camrdale at gmail.com
Sat Apr 8 23:16:51 UTC 2006


I have a very confusing problem that has arisen for my package. A new
upstream version has been released that moves the configuration info
from a php file into the database. I would like to do this in as
user-friendly a way as possible, so I'm trying to have the upgrade read
the php file and use those values in the database settings rather than
the default values.

I would like to use the scripts upgrade functionality of
dbconfig-common, but I'm not sure about the mixing of scripts and sql
files for upgrading. I looked at the dbconfig-common postinst script,
and it looks like it does upgrades in this order:

  1. script updates (in the order of versions)
  2. admin sql upgrades (in the order of versions)
  3. sql upgrades (in the order of versions)

I'm not sure if I read it correctly, but this seems to suggest that I
can't mix script and sql updates, as they will be applied in the wrong
order. For example, if I use sql for the upgrade from 3->4, and a script
for the upgrade from 4->5, then an upgrade from 3->5 would first apply
the 4->5 script upgrade and then apply the 3->4 sql upgrade. Have I
understood this correctly?

If I am correct, then this is undocumented, and seems to limit the
usefulness of scripts, as you have to start using them from the
beginning or never use them at all.

Any suggestions for my upgrade situation?

-- 
Cameron Dale
camrdale at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/dbconfig-common-devel/attachments/20060408/a511bd40/signature-0001.pgp


More information about the Dbconfig-common-devel mailing list