[Nitro] Automatic object evolution
transfire at gmail.com
Thu Oct 27 07:50:56 EDT 2005
On 10/27/05, Rob Pitt <rob at motionpath.com> wrote:
> Ahh conflicting information!
> George wants interactive, me and Chris want it settable with options
> when doing Og.setup and you want methods :)
I'm not so sure we "want", I think it's more just suggsting possible solution.
> Here is how I see this then,
> Interactive is the default behaviour.
> You can set options like:
Ah this helps.
> :store => 'psql',
> :address => 'host',
> :name => 'database',
> :user => dbclient',
> :password => 'naughty',
> :evolve_schema => 'true' <------------- this would cause both
> create and delete to happen non-interactively but would log info in
> debug mode
Okay, but the default if not given is false.
> :evolve_schema_constructive => 'true' <---------- this would
> cause creates to happen silently but prompt for delete
I'm not so sure about prompting. Prompting is generally not a good
idea --that's why we have settings like this one. How about:
:evolve_schema_cautious => 'true' <---------- this would
> cause creates to happen but not deletes.
only applies if evolve_schema is set and it should default to true.
> :evolve_schema_destructive => 'true' <---------- this would
> cause deletes to happen silently but prompt for creates
This last one I think is useless.
The reason I take this approach is because it is too easy to
inadvertantly cause a field delete, and if your working in live-data
conditions by chance....well, I hope you remembered to back-up!
More information about the Nitro-general