user blocking
This commit is contained in:
parent
ccb6e23960
commit
2804c55fd9
9 changed files with 44 additions and 11 deletions
5
db/migrate/20210321213901_add_status_to_users.rb
Normal file
5
db/migrate/20210321213901_add_status_to_users.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddStatusToUsers < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :users, :status, :integer
|
||||
end
|
||||
end
|
3
db/schema.rb
generated
3
db/schema.rb
generated
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2021_03_21_135711) do
|
||||
ActiveRecord::Schema.define(version: 2021_03_21_213901) do
|
||||
|
||||
create_table "authors", force: :cascade do |t|
|
||||
t.string "first_name"
|
||||
|
@ -45,6 +45,7 @@ ActiveRecord::Schema.define(version: 2021_03_21_135711) do
|
|||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.string "recovery_password_digest"
|
||||
t.integer "role"
|
||||
t.integer "status"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -40,16 +40,19 @@ User.create([
|
|||
{
|
||||
email: 'abc@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :admin
|
||||
role: :admin,
|
||||
status: :ready
|
||||
},
|
||||
{
|
||||
email: 'abcd@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :customer
|
||||
role: :customer,
|
||||
status: :ready
|
||||
},
|
||||
{
|
||||
email: 'abcde@o2.pl',
|
||||
password: 'aaaaaaaa',
|
||||
role: :customer
|
||||
role: :customer,
|
||||
status: :ready
|
||||
},
|
||||
])
|
Loading…
Add table
Add a link
Reference in a new issue