Austin Govella wrote:> To reverse a migration that sets a default value, do you set the default
> to nil?
>
> And, if you''re setting a couple of default values just to make
early
> development easier, is it best to do that directly to the database and
> not clutter your migrations with them? (I.e., it''s not a *real* db
> change.)
>
>
>
> Thanks,
> --
> Austin Govella
> Thinking & Making: IA, UX, and IxD
> http://thinkingandmaking.com
> austin.govella@gmail.com
You should be able to just supply the ":default => nil" option but
the
last few times I tried that MySQL complained loudly about some SQL
error.
As for migrations, don''t put anything in them you wouldn''t
want done to
your production database, because that is where they ultimately go. If
you want default values for testing, put them in fixtures. If you want
to use them development mode through your browser, insert them directly
or via the console with "Model.create(:foo =>
''bar'')"
--
Posted via http://www.ruby-forum.com/.