Edit File: 2021_11_24_120114_create_delivery_offers_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateDeliveryOffersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('delivery_offers', function (Blueprint $table) { $table->id(); $table->enum('status',['new','accepted','rejected'])->default('new'); $table->double('price')->default(0); $table->text('notes')->nullable(); $table->foreignId('user_id')->constrained()->onDelete('cascade'); $table->foreignId('order_id')->constrained()->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('delivery_offers'); } }
Back to File Manager