Sunday, November 7, 2010

Re: [Rails] why is migration failing?

On 10-11-07 04:32 PM, Michael Pavling wrote:
> On 7 November 2010 21:09, Rajinder Yadav<devguy.ca@gmail.com> wrote:
>> I tried your suggestion, I get the same error. As Fred stated about sqlite3,
>> you can't add a new field without specifying a default value for a non-null
>> field. I was under the impression if the table was empty with no rows you
>> should be able to do this.
>
> Nice gotcha.... maybe it would be better for you to change from SQLite
> to something else? MySQL? PostgreSQL?
> Seeing as you're not going to deploy to SQLite, I've never understood
> the point of developing in it :-/
>
>> Since I am the only one working on this "sample" app, it's not a big deal
>> and all source is under GIT control, so not a big deal. still I wanted to
>> get into the habit of using migration.
>
> It's a good habit; and if you can help it, you really *don't* want to
> get into the bad habit of editing migrations that have already been
> run (even if you are the only developer).
>

I guess out of laziness as I ramp-up my Rails skills I've stuck to using
sqlite3, but I'll take your advice and give PostgreSQL a go. I agree
it's better to develop good habits and stick with them. Also I have to
get use to working with a production DB.

Doing a mental erase of my last comment about me falling back to editing
old migrations by hand =P

--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate