1 Tip, 1 question

Neal Campbell nealk3nc at gmail.com
Thu Jul 17 11:01:08 CDT 2008


So this method would have a discrete update path for each update iteration?

I was thinking of two possible scenarios which I wonder if the first
one would work:
1. export the database, then import it under the different scheme.
What happens if a previously existing field no longer exists in the
table, VExceptions in this approach?
2. a similar method as with my xml files, a query on each table
whether a field is present and if not add it. This also suffers from
vestigial fields being left behind but I guess I could have a periodic
cleanup routine to look for dead fields and delete them. Is there any
issues with deleting a field that has data, indices, etc.?

Thanks
Neal

On Thu, Jul 17, 2008 at 11:56 AM, Bart Pietercil
<bart.pietercil at cognosis.be> wrote:
> 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
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



-- 
Neal Campbell
Abroham Neal Software
Programming Services for Windows, OS X and Linux
(540) 242 0911
---------------------------------------------------------------------
Try Spot for OS X, the intelligent DXCluster Client at
www.abrohamnealsoftware.com - introduction priced at $10.99
-------------------------------------------------
For a great dog book, visit www.abrohamneal.com
-------------------------------------------------
See the FlexRadio Systems Flex-5000a in
action at www.flex-videos.com


More information about the Valentina mailing list