[jifty-devel] Re: automatic insertion of "since" when creating new models?

Jesse Vincent jesse at bestpractical.com
Wed Dec 28 15:04:06 EST 2005


On Wed, Dec 28, 2005 at 12:42:33PM -0500, seph wrote:
> David Glasser <glasser at bestpractical.com> writes:
> 
> > Should the "jifty model" script automatically insert a "since"
> > declaration with a future (determined how?) version number in it into
> > the new model, and perhaps bump the version number in the config
> > file?  It took me a while to remember that I needed to add the since
> > and bump the version when I created a new model.
> 
> Yes. I've been playing around, and have not been using "since"
> directives. It seems to corrupt and confusing things pretty fast. This
> leads me to think that they're *required*, so I think they should be
> automatically added. I also wonder if you should get nasty errors if
> you try to proceed without them.

It depends.

I _think_ that if you create a model and have a non-0.0.1 version for
your app, then you should certainly add the current version as the since
for a model. Note that you can also have since/until markers on columns
and Jifty will do the right thing.

It's frequently the case for me that during development, I'll create and
remove tables and columns as my schema evolves, blowing away and
creating the database anew each time. Unless the config file version was
_flawlessly_ incremented, I wouldn't want it to semi-magically increment
every time I added a new model.



More information about the jifty-devel mailing list