change plugins.private_flag to public_flag
This commit is contained in:
8
db/migrate/20141016020624_add_public_flag_to_plugins.rb
Normal file
8
db/migrate/20141016020624_add_public_flag_to_plugins.rb
Normal 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
|
||||
|
@ -0,0 +1,6 @@
|
||||
class RemovePrivateFlagFromPlugins < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :plugins, :private_flag
|
||||
end
|
||||
end
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user