Add db default value for build_lists field build_requires. Refs #2261

This commit is contained in:
Pavel Chipiga 2011-11-30 21:03:58 +02:00
parent e7a6b01e09
commit 76c5c86c27
3 changed files with 12 additions and 3 deletions

View File

@ -15,7 +15,7 @@ class PlatformsController < ApplicationController
bl.update_type = 'recommended'
bl.arch = Arch.find_by_name('i586')
bl.project_version = "latest_#{@platform.name}"
bl.build_requires = false
bl.build_requires = false # already set as db default
end
end
end

View File

@ -0,0 +1,9 @@
class ChangeBuildListsBuildRequiresDefaultValue < ActiveRecord::Migration
def self.up
change_column_default :build_lists, :build_requires, false
end
def self.down
change_column_default :build_lists, :build_requires, nil
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20111128140341) do
ActiveRecord::Schema.define(:version => 20111130181101) do
create_table "arches", :force => true do |t|
t.string "name", :null => false
@ -65,7 +65,7 @@ ActiveRecord::Schema.define(:version => 20111128140341) do
t.boolean "is_circle", :default => false
t.text "additional_repos"
t.string "name"
t.boolean "build_requires"
t.boolean "build_requires", :default => false
t.string "update_type"
t.integer "bpl_id"
t.integer "pl_id"