Make User::email required

It shouldn't be required, but it's necessary for Carbon::Emailable.
Esse commit está contido em:
Les De Ridder 2020-03-07 20:01:11 +01:00
commit b2ede45d82
3 arquivos alterados com 3 adições e 3 exclusões

Ver arquivo

@ -5,7 +5,7 @@ class CreateUsers::V00000000000001 < Avram::Migrator::Migration::V1
add name : String, unique: true
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
end
end

Ver arquivo

@ -3,6 +3,6 @@ class Role < BaseModel
column name : String
column description : String?
has_many users : User, foreign_key: :primary_role_id #####
has_many users : User, foreign_key: :primary_role_id
end
end

Ver arquivo

@ -5,7 +5,7 @@ class User < BaseModel
table do
column name : String
column encrypted_password : String
column email : String?
column email : String
column created_at : Time
belongs_to primary_role : Role