What I understand is that you want to update User records, not to create seed (seed adds data to your database, for example Roles ans so on, which are important to your application). From documentaion:
class AddReceiveNewsletterToUsers < ActiveRecord::Migration
def self.up
change_table :users do |t|
t.boolean :receive_newsletter, :default => false
end
User.update_all ["receive_newsletter = ?", true]
end
def self.down
remove_column :users, :receive_newsletter
end
end
You can also use your models inside migration:
User.all(:conditions => {}).each do |user|
user.do_sth
user.save
end
and so on, read about caveats
Edit:
After your comment, this is how I think you should do it in migration;
class AddInvitationLimitToUser < ActiveRecord::Migration
def selt.up
change_table :users do |t|
t.integer :invitation_limit # and add validation to model `validates_presence_of` and so on
end
# now update all records already in database, which didn't had value in invitation_limit column
User.update_all ["invitation_limit = ?", 5]
end
def self.down
remove_column, :users, :invitation_limit
end
end