diff --git a/db/migrate/20140219191644_add_auto_publish_status_to_build_list.rb b/db/migrate/20140219191644_add_auto_publish_status_to_build_list.rb index 1b2412bb2..6dc53f14b 100644 --- a/db/migrate/20140219191644_add_auto_publish_status_to_build_list.rb +++ b/db/migrate/20140219191644_add_auto_publish_status_to_build_list.rb @@ -8,9 +8,14 @@ class AddAutoPublishStatusToBuildList < ActiveRecord::Migration add_column :build_lists, :auto_publish_status, :string, default: 'none', null: false BuildList.where(auto_publish: true).update_all(auto_publish_status: :default) change_column :build_lists, :auto_publish_status, :string, default: 'default', null: false + remove_column :build_lists, :auto_publish end 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 end end diff --git a/db/schema.rb b/db/schema.rb index ff37abb52..4fc08f65c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -122,7 +122,6 @@ ActiveRecord::Schema.define(:version => 20140219191644) do t.integer "save_to_platform_id" t.text "include_repos" t.integer "user_id" - t.boolean "auto_publish", :default => true t.string "package_version" t.string "commit_hash" t.integer "priority", :default => 0, :null => false