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->string( 'personal_image' )->nullable(); $table->foreignId( 'user_id' )->nullable()->constrained()->references( 'id' )->on( 'users' )->onDelete( 'cascade' ); $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_number' )->nullable(); $table->string( 'identity_card' )->nullable(); $table->string( 'identity_number' )->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( '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( 'address' )->nullable(); $table->foreignId( 'company_id')->nullable()->constrained()->references('id')->on('users')->onDelete('set null'); $table->foreignId('category_id')->nullable()->constrained()->references('id')->on('categories')->onDelete('set null'); $table->foreignId('car_type_id')->nullable()->constrained()->references('id')->on('cartypes')->onDelete('set null'); $table->foreignId('car_model_id')->nullable()->constrained()->references('id')->on('cars')->onDelete('set null'); $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('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('seen',['true','false'])->default('false'); $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_joinrequests' ); } }
Back to File Manager