Skip to content

Commit

Permalink
feat(users): Add default account role
Browse files Browse the repository at this point in the history
Signed-off-by: microlith57 <microlith57@gmail.com>
  • Loading branch information
microlith57 committed Nov 16, 2018
1 parent 30e1a1a commit 4326dfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions db/migrate/20181116020631_add_default_for_user_role.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddDefaultForUserRole < ActiveRecord::Migration[5.2]
def change
change_column_default :users, :role, 'standard'
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2018_11_15_220605) do
ActiveRecord::Schema.define(version: 2018_11_16_020631) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand All @@ -32,7 +32,7 @@
t.string "unconfirmed_email"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "role"
t.string "role", default: "standard"
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
Expand Down

0 comments on commit 4326dfe

Please sign in to comment.