1 Tip, 1 question

Bart Pietercil bart.pietercil at cognosis.be
Thu Jul 17 10:56:10 CDT 2008


Hi Neal,

On 17 Jul 2008, at 17:33, Neal Campbell wrote:
>
>
> Now the question:
> In dealing with changes to table definitions that occur over time (for
> instance to support new features), what is the preferred way to
> migrate old data to new? In my programs where I use XML preference
> files, for instance, I validate that all of the xml tags are present
> and add those on the fly if not. Is that how people do it with
> Valentina?
>


I will assume you are working on a local copy (not a VServer)
I would propose to store a database property your_schema_version
Then you would run a script as

case your_schema_version of (x)
execute structure change commands
update records if necessary
set new schema_version = y
end case

case your_schema_version of (y)
execute structure change commands
update records if necessary
set new schema_version (z)
end case


This permits to Iterate over consecutive schema upgrades in case a  
client missed an upgrade

just an idea

hth

Bart Pietercil


More information about the Valentina mailing list