usermanagement/database/migrations/2024_07_31_023136_update_users_table.php

33 lines
852 B
PHP
Raw Normal View History

2024-08-07 01:47:07 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('profile_photo_path', 2048)->nullable()->after('email');
$table->datetime('last_login_at')->nullable();
$table->string('last_login_ip')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('profile_photo_path');
$table->dropColumn('last_login_at');
$table->dropColumn('last_login_ip');
});
}
};