added admin field to users

This commit is contained in:
nilsding 2014-11-26 17:02:47 +01:00
parent 976cdef4d7
commit 96dbb77f7c
2 changed files with 16 additions and 10 deletions

View File

@ -0,0 +1,5 @@
class AddAdminToUsers < ActiveRecord::Migration
def change
add_column :users, :admin, :boolean, default: false, null: false
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: 20141113164314) do
ActiveRecord::Schema.define(version: 20141126154451) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -80,6 +80,7 @@ ActiveRecord::Schema.define(version: 20141113164314) do
t.integer "commented_count", default: 0, null: false
t.string "display_name"
t.integer "smiled_count", default: 0, null: false
t.boolean "admin", default: false, null: false
end
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree