add default value for new_core

This commit is contained in:
Vokhmin Alexey V 2013-01-19 17:08:56 +04:00
parent a52d990b56
commit 9310a8db54
3 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,9 @@
class SetDefaultValueForNewCore < ActiveRecord::Migration
def up
change_column :build_lists, :new_core, :boolean, :default => true
end
def down
change_column :build_lists, :new_core, :boolean, :default => nil
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130110104600) do
ActiveRecord::Schema.define(:version => 20130119125710) do
create_table "activity_feeds", :force => true do |t|
t.integer "user_id", :null => false
@ -131,7 +131,7 @@ ActiveRecord::Schema.define(:version => 20130110104600) do
t.integer "mass_build_id"
t.integer "save_to_repository_id"
t.text "results"
t.boolean "new_core"
t.boolean "new_core", :default => true
t.string "last_published_commit_hash"
end

View File

@ -10,6 +10,7 @@ FactoryGirl.define do
pr
}
association :arch
new_core false
build_for_platform {|bl| bl.save_to_platform}
save_to_repository {|bl| bl.save_to_platform.repositories.first}
update_type 'security'