rails 3 migration generator generating migration with identical up & down
Reported by Betelgeuse | December 11th, 2010 @ 12:54 PM | in Hobo 1.3 (Rails 3)
I have a model like:
class Pivot < ActiveRecord::Base
hobo_model
fields do
end
belongs_to :a, :null => :false
belongs_to :b, :null => :false
index [:a_id, :b_id], :unique => true
end
Now rails g hobo:migration wants to run this:
---------- Up Migration ----------
change_column :pivots, :a_id, :integer
change_column :pivots, :b_id, :integer
----------------------------------
---------- Down Migration --------
change_column :pivots, :a_id, :integer
change_column :pivots, :b_id, :integer
----------------------------------
Comments and changes to this ticket
-
Betelgeuse December 11th, 2010 @ 01:08 PM
I have similar pivot models in hobo 1.0 projects and they work there. My quick guess is that :null => false for belongs_to is not working properly.
-
Domizio Demichelis December 19th, 2010 @ 06:04 PM
- Milestone set to Hobo 1.3 (Rails 3)
- State changed from new to open
- Milestone order changed from 4 to 0
-
Domizio Demichelis March 27th, 2011 @ 06:04 PM
- State changed from open to invalid
- Milestone order changed from 40 to 0
I was unable to reproduce that even after running migration in different steps (incremental, whole migration, etc). (ruby 1.9.2-p136, rails 3.0.4, pre30)
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป