Edit File: 2024_05_19_113735_create_delegate_update_data_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateDelegateUpdateDataTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('delegate_update_data', function (Blueprint $table) { $table->id(); $table->foreignId('user_id')->nullable()->constrained()->references('id')->on('users')->onDelete('cascade'); $table->foreignId('category_id')->nullable()->constrained()->nullable('id')->on('categories')->onDelete('cascade'); $table->foreignId('city_id')->nullable()->constrained()->references('id')->on('cities')->onDelete('set null'); $table->foreignId('car_type_id')->nullable()->constrained()->references('id')->on('cartypes')->onDelete('set null'); $table->foreignId('car_model_id')->nullable(); $table->string('fullname')->nullable(); $table->string('identity_card_number')->nullable(); $table->string('country_key')->nullable(); $table->string('phone')->nullable(); $table->string('car_numbers')->nullable(); $table->string('driving_license_image')->nullable(); $table->string('car_license_image')->nullable(); $table->string('delegation_image')->nullable(); $table->string('identity_card_image')->nullable(); $table->string('personal_image')->nullable(); $table->string('car_front_image')->nullable(); $table->string('bank_account_number')->nullable(); $table->string('bank_iban_number')->nullable(); $table->string('bank_name')->nullable(); $table->string('bank_account_owner')->nullable(); $table->enum('status', ['approved', 'rejected', 'pending'])->default('pending'); // in users table exists status $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('delegate_update_data'); } }
Back to File Manager