#358: cleanup build_lists table
This commit is contained in:
parent
4b1e0f2efd
commit
8ed84cc7e5
|
@ -8,9 +8,14 @@ class AddAutoPublishStatusToBuildList < ActiveRecord::Migration
|
||||||
add_column :build_lists, :auto_publish_status, :string, default: 'none', null: false
|
add_column :build_lists, :auto_publish_status, :string, default: 'none', null: false
|
||||||
BuildList.where(auto_publish: true).update_all(auto_publish_status: :default)
|
BuildList.where(auto_publish: true).update_all(auto_publish_status: :default)
|
||||||
change_column :build_lists, :auto_publish_status, :string, default: 'default', null: false
|
change_column :build_lists, :auto_publish_status, :string, default: 'default', null: false
|
||||||
|
remove_column :build_lists, :auto_publish
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
# Make existing build_lists false, but default to true in the future.
|
||||||
|
add_column :build_lists, :auto_publish, :boolean, default: false
|
||||||
|
BuildList.where(auto_publish_status: :default).update_all(auto_publish: true)
|
||||||
|
change_column :build_lists, :auto_publish, :boolean, default: true
|
||||||
remove_column :build_lists, :auto_publish_status
|
remove_column :build_lists, :auto_publish_status
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -122,7 +122,6 @@ ActiveRecord::Schema.define(:version => 20140219191644) do
|
||||||
t.integer "save_to_platform_id"
|
t.integer "save_to_platform_id"
|
||||||
t.text "include_repos"
|
t.text "include_repos"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.boolean "auto_publish", :default => true
|
|
||||||
t.string "package_version"
|
t.string "package_version"
|
||||||
t.string "commit_hash"
|
t.string "commit_hash"
|
||||||
t.integer "priority", :default => 0, :null => false
|
t.integer "priority", :default => 0, :null => false
|
||||||
|
|
Loading…
Reference in New Issue