annotate db/migrate/20090503121505_populate_member_roles.rb @ 558:c94e23a6eff1 feature_36

Related to Bug #222Updated the look of the authors list (more intuitive to sort). Created the plugin's stylesheet file.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 03 Aug 2011 16:27:13 +0100
parents 513646585e45
children 622f24f53b42
rev   line source
Chris@0 1 class PopulateMemberRoles < ActiveRecord::Migration
Chris@0 2 def self.up
Chris@0 3 MemberRole.delete_all
Chris@0 4 Member.find(:all).each do |member|
Chris@0 5 MemberRole.create!(:member_id => member.id, :role_id => member.role_id)
Chris@0 6 end
Chris@0 7 end
Chris@0 8
Chris@0 9 def self.down
Chris@0 10 MemberRole.delete_all
Chris@0 11 end
Chris@0 12 end