Permalink
Browse files

#358: cleanup build_lists table

  • Loading branch information...
1 parent 4b1e0f2 commit 8ed84cc7e5348d41ab94079d323e5b35e9b26e26 @avokhmin avokhmin committed Feb 19, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −0 db/migrate/20140219191644_add_auto_publish_status_to_build_list.rb
  2. +0 −1 db/schema.rb
@@ -8,9 +8,14 @@ def up
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
View
@@ -122,7 +122,6 @@
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

0 comments on commit 8ed84cc

Please sign in to comment.