Edit File: 2024_09_30_124500_add_columns_to_orders_table.php
<?php use App\Enums\SettlementType; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('settlements', function (Blueprint $table) { $table->decimal('commission_value_from_provider', 10, 2)->default(0); $table->decimal('commission_value_from_delegate', 10, 2)->default(0); $table->foreignId('room_id')->nullable()->constrained('rooms')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('settlements', function (Blueprint $table) { $table->dropColumn('type'); }); } };
Back to File Manager