[Chicago] Random book notes
Martin Maney
maney at two14.net
Thu May 4 21:29:01 CEST 2006
On Thu, May 04, 2006 at 10:11:25AM -0400, Jess Balint wrote:
> You might want to check out Rails migration (which can be used without
> Rails).
>
> <http://jamis.jamisbuck.org/articles/2005/09/27/getting-started-with-activer
> ecord-migrations>
> http://garrettsnider.backpackit.com/pub/367902
I might, although I'd heard, admittedtly at third hand, that the hard
parts relied on hand-written scripts to actually manage the existing
data. Can't really tell anything from those hand-waving pages.
<time passes, google is consulted>
http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations
This seems clearer. It has a one trivial example (adding a new,
empty table; the revert code just drops it), and seems to agree: this
is just a framework on which to hang your manually generated change
scripts. As I understand it, Django (in the new, still-damp magic
removal form) can already handle that sort of trivial change without
writing any code at all. (of course you do have to write the model's
definition, which may contain code if the object needs it, but that
code's actually part of your app's logic, not the database. this is
one of the things I find disappointing about Django's ORM (and others):
they do too much of the data sanity checking only in the ORM/framework,
and treat the database mostly as a dumb filesystem to hold their data.)
--
In software as well as in modern art,
the distinction between intentional and accidental omissions
is often difficult to make. -- Andrew Hunt & David Thomas
More information about the Chicago
mailing list