Additional fields 'is_active' and 'timezone' have been added to the users table in the database migrations and the User model. This update allows us to better manage user's activation status and time zone preferences. 'is_active' field, a boolean field, signifies the active status of a user and has been set to default to false. 'timezone', an optional string, will store user's preferred timezone.
This commit is contained in:
parent
cf449eb8e2
commit
34319e5724
@ -22,6 +22,8 @@ class User extends Authenticatable
|
|||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
|
'timezone',
|
||||||
|
'is_active',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,5 +43,6 @@ class User extends Authenticatable
|
|||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
|
'is_active' => 'boolean'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,13 @@ return new class extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('users', function (Blueprint $table) {
|
Schema::create('users', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
|
$table->boolean('is_active')->default(0)->index();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
$table->timestamp('email_verified_at')->nullable();
|
$table->timestamp('email_verified_at')->nullable();
|
||||||
$table->string('password');
|
$table->string('password');
|
||||||
$table->rememberToken();
|
$table->rememberToken();
|
||||||
|
$table->string('timezone')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user