Mercurial > hg > soundsoftware-site
annotate .svn/pristine/4e/4e8ea0df2bcad47fe62855e09a9ca0f2f38daa1e.svn-base @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +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 |