鏡像自
https://github.com/redmine/redmine.git
synced 2024-08-27 05:58:46 +02:00
![Jean-Philippe Lang](/assets/img/avatar_default.png)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11994 e93f8b46-1217-0410-a6f0-8f06a7374b81
14 行
446 B
Ruby
14 行
446 B
Ruby
class AddQueriesVisibility < ActiveRecord::Migration
|
|
def up
|
|
add_column :queries, :visibility, :integer, :default => 0
|
|
Query.where(:is_public => true).update_all(:visibility => 2)
|
|
remove_column :queries, :is_public
|
|
end
|
|
|
|
def down
|
|
add_column :queries, :is_public, :boolean, :default => true, :null => false
|
|
Query.where('visibility <> ?', 2).update_all(:is_public => false)
|
|
remove_column :queries, :visibility
|
|
end
|
|
end
|