<?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->dropColumn('country');
            $table->dropColumn('city_id');
            $table->dropColumn('company_id');
            $table->string('nick_name')->nullable();
            $table->unsignedBigInteger('nationality_id')->nullable();
            $table->string('user_number')->nullable()->after('id');
            $table->integer('parent_approval')->default(1);
            $table->integer('blur_image')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->unsignedBigInteger('country_id')->nullable();
            $table->unsignedBigInteger('city_id')->nullable();
            $table->unsignedBigInteger('company_id')->nullable();
            $table->dropColumn('nick_name');
            $table->dropColumn('nationality_id');
            $table->dropColumn('user_number');
            $table->dropColumn('parent_approval');
            $table->dropColumn('blur_image');
        });
    }
};
