annotate .svn/pristine/4e/4e8ea0df2bcad47fe62855e09a9ca0f2f38daa1e.svn-base @ 1480:75fd8eace091 issue_556

Close obsolete branch issue_556
author Chris Cannam
date Sat, 13 Jul 2013 15:26:30 +0100
parents 038ba2d95de8
children
rev   line source
Chris@1296 1 class AddRolePosition < ActiveRecord::Migration
Chris@1296 2 def self.up
Chris@1296 3 add_column :roles, :position, :integer, :default => 1
Chris@1296 4 Role.all.each_with_index {|role, i| role.update_attribute(:position, i+1)}
Chris@1296 5 end
Chris@1296 6
Chris@1296 7 def self.down
Chris@1296 8 remove_column :roles, :position
Chris@1296 9 end
Chris@1296 10 end