[Schevo-devel] Re: [EVALUATION] - How to Evolve a Database

Patrick K. O'Brien pobrien at orbtech.com
Fri Mar 10 07:34:35 EST 2006


Ilias Lazaridis wrote:
> Ilias Lazaridis wrote:
>> Matthew Scott wrote:
> ...
>>> How about this:
>>>
>>> "evo create foo.db"  restricted to creation only.
>>>
>>> "evo db evolve foo.db"  evolves foo.db to the schema for the version
>>> that the database is currently in.  For instance, if there are two
>>> schema versions, schema_001 and schema_002, and the database is using
>>> version 1, "evo upgrade" would only do an intra-version evolution.
> 
> "evo db evolve --current foo.db"
> 
>>> "evo db evolve --newest foo.db" would evolve foo.db to the most current
>>> schema available.
> 
> ok
> 
>>> "evo db evolve --version 2 foo.db" would evolve foo.db to version 2, as
>>> long as it isn't already at a version higher than 2.
> 
> ok
> 
>> The default behaviour of "evo db evolve" or "evo evolve" should update
>> to the latest schema, latest version.
>>
>> The command-line options should alter this default behaviour.
>>
>> To allow highest flexibility, the default behaviour should be
>> configurable somehow.
> 
> --current
> 
> --newest
> 
> -
> 
> personally (and for newcomers), I would configure "--newest" to be the
> default option.
> 
> -
> 
> Just as a thought:
> 
> --version 0 (evolve within current version)
> 
> --version n (evolve to specified version
> 
> --version -1 (evolve to latest version)
> 
> default = --version -1

We should also look at what we had in Schevo2 because we had a lot of
these options there.  During development one typically wants to upgrade
existing databases aggressively.  After deployment, however, one
typically wants to be able to open a database without altering it at
all, at least as the default behavior.  Which reminds me that I think we
used to trigger this evolution step during the opening of a database.
In any event, this is definitely something that will need a great deal
of flexibility.

-- 
Patrick K. O'Brien
Orbtech       http://www.orbtech.com
Schevo        http://www.schevo.org
Louie         http://www.pylouie.org




More information about the Schevo-devel mailing list