diff --git a/app/views/api/v1/build_lists/show.json.jbuilder b/app/views/api/v1/build_lists/show.json.jbuilder index 1d912f07b..327674067 100644 --- a/app/views/api/v1/build_lists/show.json.jbuilder +++ b/app/views/api/v1/build_lists/show.json.jbuilder @@ -1,6 +1,6 @@ json.build_list do |json| json.(@build_list, :id, :name, :container_path, :status, :duration) - json.(@build_list, :is_circle, :update_type, :priority) + json.(@build_list, :is_circle, :update_type, :priority, :new_core) json.(@build_list, :advisory, :mass_build) json.(@build_list, :auto_publish, :package_version, :commit_hash, :last_published_commit_hash) json.build_log_url log_build_list_path(@build_list) 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'