Make User::email required
It shouldn't be required, but it's necessary for Carbon::Emailable.
This commit is contained in:
parent
aab65e17b3
commit
b2ede45d82
|
@ -5,7 +5,7 @@ class CreateUsers::V00000000000001 < Avram::Migrator::Migration::V1
|
||||||
|
|
||||||
add name : String, unique: true
|
add name : String, unique: true
|
||||||
add encrypted_password : String # NOTE: Should really be called 'password_hash'
|
add encrypted_password : String # NOTE: Should really be called 'password_hash'
|
||||||
add email : String?, unique: true
|
add email : String, unique: true # NOTE: Should be nilable, but Carbon::Emailable doesn't really support it
|
||||||
add created_at : Time
|
add created_at : Time
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,6 @@ class Role < BaseModel
|
||||||
column name : String
|
column name : String
|
||||||
column description : String?
|
column description : String?
|
||||||
|
|
||||||
has_many users : User, foreign_key: :primary_role_id #####
|
has_many users : User, foreign_key: :primary_role_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ class User < BaseModel
|
||||||
table do
|
table do
|
||||||
column name : String
|
column name : String
|
||||||
column encrypted_password : String
|
column encrypted_password : String
|
||||||
column email : String?
|
column email : String
|
||||||
column created_at : Time
|
column created_at : Time
|
||||||
|
|
||||||
belongs_to primary_role : Role
|
belongs_to primary_role : Role
|
||||||
|
|
Loading…
Reference in New Issue