Edit File: 2021_11_08_141029_create_delegate_joinrequests_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateDelegateJoinrequestsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('delegate_joinrequests', function (Blueprint $table) { $table->id(); $table->foreignId('user_id')->nullable()->constrained()->onDelete('cascade'); $table->foreignId('company_id')->nullable()->constrained()->references('id')->on('users')->onDelete('set null'); $table->string('qr')->nullable(); $table->string('citc_errorCodes')->nullable(); $table->string('citc_refrenceCode')->nullable(); $table->enum('citc_notification',['true','false'])->default('false'); $table->string('fullname')->nullable(); $table->string('identity_card')->nullable(); $table->foreignId('nationality_id')->nullable()->constrained()->references('id')->on('nationalities')->onDelete('set null'); $table->string('driver_date_of_birth')->nullable(); $table->string('sponsor_name')->nullable(); $table->foreignId('region_id')->nullable()->constrained()->references('id')->on('regions')->onDelete('set null'); $table->foreignId('city_id')->nullable()->constrained()->references('id')->on('cities')->onDelete('set null'); $table->string('email')->nullable(); $table->string('country_key')->nullable(); $table->string('phone')->nullable(); $table->string('bank_name')->nullable(); $table->string('address')->nullable(); $table->string('bank_acc_number')->nullable(); $table->string('bank_iban_number')->nullable(); $table->foreignId('car_type_id')->nullable()->constrained()->references('id')->on('cartypes')->onDelete('set null'); $table->string('car_numbers')->nullable(); $table->string('car_letters')->nullable(); $table->string('personal_image')->nullable(); $table->string('car_model')->nullable(); $table->string('manufacturing_year')->nullable(); $table->string('driving_license')->nullable(); $table->string('identity_card_image')->nullable(); $table->string('iban_image')->nullable(); $table->string('car_license')->nullable(); $table->string('car_back')->nullable(); $table->string('car_front')->nullable(); $table->enum('seen',['true','false'])->default('false'); $table->enum('status',['approved','rejected','pending'])->default('pending'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('delegate_joinrequests'); } }
Back to File Manager