File: /var/www/api.ayokah.co.uk/database/migrations/2014_10_12_000023_create_users_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('lastname')->nullable();
$table->string('email')->unique();
$table->string('phone')->unique();
$table->enum('status', ['active', 'inactive'])->default('inactive');
$table->enum('role', ['admin', 'seller', 'customer'])->default('customer');
$table->string('country');
$table->string('password');
$table->string('last_seen')->nullable();
$table->text('token')->nullable();
$table->integer('set_pin')->default(1)->comment('0=set', '1=unset'); // 0 or 1
$table->string('pin')->nullable(); // has the setted pin
$table->string('device_token')->nullable(); // has the setted pin
$table->string('device_type')->nullable(); // has the setted pin
$table->timestamp('email_verified_at')->nullable();
$table->rememberToken();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('users');
}
};