mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-28 08:54:03 +00:00
40 lines
960 B
PHP
40 lines
960 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateShipmentitemsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('shipmentitems', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->unsignedInteger('so_id');
|
|
$table->foreign('so_id')
|
|
->references('id')->on('sos')
|
|
->onDelete('cascade');
|
|
$table->unsignedInteger('sa_id');
|
|
$table->foreign('sa_id')
|
|
->references('id')->on('shipments')
|
|
->onDelete('cascade');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('shipmentitems');
|
|
}
|
|
}
|