File: /var/www/ipsremont-demo/database/migrations/2021_02_12_110120_shipment_sdek_changes_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ShipmentSdekChangesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shipment_sdek_changes', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('shipment_id');
$table->string('code');
$table->string('name');
$table->dateTime('date_time');
$table->string('city');
$table->string('reason_code')->nullable();
$table->timestamp('created_at')->nullable()->useCurrent();
$table->timestamp('updated_at')->nullable()->useCurrent();
$table->softDeletes();
$table->foreign('shipment_id')->references('id')->on('shipment')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}