Edit File: 2021_11_06_144614_create_delegate_companies_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateDelegateCompaniesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('delegate_companies', function (Blueprint $table) { $table->id(); $table->string('name')->nullable(); $table->string('commercial_number')->nullable(); $table->string('commercial_image')->nullable(); $table->string('register_link')->nullable(); $table->foreignId('category_id')->nullable()->constrained()->nullable('id')->on('categories')->onDelete('cascade'); $table->string('avatar')->nullable(); $table->foreignId('city_id')->nullable()->constrained()->onDelete('cascade')->onUpdate('cascade'); $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_license_image')->nullable(); $table->string('driving_license_image')->nullable(); $table->string('car_front_image')->nullable(); $table->string('delegation_image')->nullable(); $table->string('bank_account_owner')->nullable(); $table->string('bank_name')->nullable(); $table->string('bank_account_number')->nullable(); $table->string('bank_iban_number')->nullable(); $table->string('car_numbers')->nullable(); $table->foreignId('user_id')->nullable()->constrained('users','id')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('delegate_companies'); } }
Back to File Manager