Chris@1517: class AddWikiAttachmentsPermissions < ActiveRecord::Migration Chris@1517: # model removed Chris@1517: class Permission < ActiveRecord::Base; end Chris@1517: Chris@1517: def self.up Chris@1517: Permission.create :controller => 'wiki', :action => 'add_attachment', :description => 'label_attachment_new', :sort => 1750, :is_public => false, :mail_option => 0, :mail_enabled => 0 Chris@1517: Permission.create :controller => 'wiki', :action => 'destroy_attachment', :description => 'label_attachment_delete', :sort => 1755, :is_public => false, :mail_option => 0, :mail_enabled => 0 Chris@1517: end Chris@1517: Chris@1517: def self.down Chris@1517: Permission.where(:controller => "wiki", :action => "add_attachment").each {|p| p.destroy} Chris@1517: Permission.where(:controller => "wiki", :action => "destroy_attachment").each {|p| p.destroy} Chris@1517: end Chris@1517: end