change plugins.private_flag to public_flag

This commit is contained in:
Lee Lawlor
2014-10-16 10:43:21 -04:00
parent 75ac3db89a
commit e9ad17f5f4
11 changed files with 57 additions and 50 deletions

View File

@ -0,0 +1,8 @@
class AddPublicFlagToPlugins < ActiveRecord::Migration
def change
add_column :plugins, :public_flag, :boolean, default: false
# set existing public_flag values
execute("UPDATE plugins SET public_flag = true WHERE private_flag = false")
end
end

View File

@ -0,0 +1,6 @@
class RemovePrivateFlagFromPlugins < ActiveRecord::Migration
def change
remove_column :plugins, :private_flag
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141007195311) do
ActiveRecord::Schema.define(version: 20141016143645) do
create_table "active_admin_comments", force: true do |t|
t.string "namespace"
@ -236,7 +236,7 @@ ActiveRecord::Schema.define(version: 20141007195311) do
t.text "js"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "private_flag", default: true
t.boolean "public_flag", default: false
end
add_index "plugins", ["user_id"], name: "index_plugins_on_user_id", using: :btree