Sha256: 9d5c419d722e701149d771d9a71f799155c6db41418f49e34b47f3d0dfeedc4c
Contents?: true
Size: 312 Bytes
Versions: 9
Compression:
Stored size: 312 Bytes
Contents
class AddMailinglistidToUsers < ActiveRecord::Migration def self.up add_column :users, :mailinglist_id, :integer User.find_all.each do |u| u.mailinglist_id = Mailinglist.find_by_name(u.login).id u.save end end def self.down remove_column :users, :mailinglist_id end end
Version data entries
9 entries across 9 versions & 1 rubygems