Edit File: 2022_02_01_083937_create_profits_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateProfitsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('profits', function (Blueprint $table) { $table->id(); $table->foreignId('order_id')->constrained()->references('id')->on('orders')->onDelete('cascade'); $table->double('delivery_app_percentage')->nullable(); $table->double('added_value')->nullable(); $table->double('total_delivery_profits')->nullable(); $table->double('products_app_percentage')->nullable(); $table->double('total_order_profits')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('profits'); } }
Back to File Manager