diff --git a/db/migrate/20130119125710_set_default_value_for_new_core.rb b/db/migrate/20130119125710_set_default_value_for_new_core.rb new file mode 100644 index 000000000..9d92a9376 --- /dev/null +++ b/db/migrate/20130119125710_set_default_value_for_new_core.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index cb5c6635a..81e83254f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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 diff --git a/spec/factories/build_lists.rb b/spec/factories/build_lists.rb index 233f19567..fba42d386 100644 --- a/spec/factories/build_lists.rb +++ b/spec/factories/build_lists.rb @@ -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'