I have an error while running the migration. The following is the
I have a table called sequences. Am adding a column called 'seq_type'
in migration Version 79. and after adding am also inserting a row in the
table, then its throwing an error called "undefined method seq_type= for
This is my code.
add_column :sequences, :seq_type, :integer, :limit => 1
Sequence.create(:user_id => 1, :seq_type => 2)
Column is getting added, but the row is not getting created. when I run
the migration again by commenting the first line , then its working
Why it is not working for the first time?
I also tried to put the row creation in the next migration, even then
What could be the reason?? It it not detecting the column? If not what
Kindly please help me..