Bug #375

rake migrate fails

Added by dweinand-gmail-com - 1068 days ago. Updated 754 days ago.

Status :Closed Start :
Priority :Normal Due date :
Assigned to :tobi - % Done :

0%

Category :backend
Target version :-
Resolution :

fixed


Description

I updated from the current svn.
But, when trying to execute 'rake migrate' it fails with:

rake aborted!
undefined method @guid' for #<Article:0xb704bce4>
./Rakefile:220

Associated revisions

Revision 608
Added by scott 1037 days ago

Fix old Postgres 2.0.6 schema bug. (closes #375)

History

08/04/2005 08:14 PM - soma-home-se -

I experienced this too, but fixed it with alternating between rake migrate and the /admin update script, and also removing from /db/migrate when rake migrate exited on certain migration schemes. It worked in the end, but it was a hassle.

08/08/2005 11:59 AM - mallow005-gmail-com -

What exactly is the /admin update script? There is no admin folder in my typo main folder...

08/08/2005 12:54 PM - anonymous -

Another rake failure:

rake aborted!
Duplicate column name 'user_id': ALTER TABLE articles ADD user_id int(11)
./Rakefile:216

This was after multiple attempts with rake and other methods.

08/11/2005 07:13 AM - clarsen-ilanyo-com -

I think the problem is that the Article model assumes schema version 9 (guid present), while the migration rule 3 uses the Article model. So it fails because guid isn't present.

I think the migrations need to be rewritten to not use model.

08/11/2005 07:49 AM - clarsen-ilanyo-com -

The problem w/ article module is that the validates_uniqueness_of :guid is always executed, rather than only if the guid attribute is present. attached is a patch.

08/23/2005 12:56 PM - scoop -

  • Status changed from New to Closed
  • Resolution set to fixed

Fixed in r533

Also available in: Atom PDF