<?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('user_device_type')->nullable();
            $table->string('user_device_token')->nullable();
            $table->string('user_phone_otp')->nullable();
            $table->string('user_email_otp')->nullable();
            $table->string('password_reset_code')->nullable();
            $table->timestamp('password_reset_time')->nullable();
            $table->string('password_reset_otp')->nullable();
            $table->integer('is_social')->default(0);
            $table->integer('phone_verified')->default(0);
            $table->string('user_access_token')->nullable();
            $table->integer('email_verified')->default(0);
            $table->integer('deleted')->default(0);

        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('user_device_type');
            $table->dropColumn('user_device_token');
            $table->dropColumn('user_phone_otp');
            $table->dropColumn('user_email_otp');
            $table->dropColumn('password_reset_code');
            $table->dropColumn('password_reset_time');
            $table->dropColumn('password_reset_otp');
            $table->dropColumn('is_social');
            $table->dropColumn('phone_verified');
            $table->dropColumn('user_access_token');
            $table->dropColumn('email_verified');
            $table->dropColumn('deleted');
        });
    }
};
