mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-23 14:34:02 +00:00
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateDecisionitemsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('decisionitems', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
|
|
$table->unsignedInteger('decision_id');//fk decison id
|
|
$table->foreign('decision_id')
|
|
->references('id')->on('decisions')
|
|
->onDelete('cascade');
|
|
|
|
$table->unsignedInteger('wi_id');//fk warehouse item id
|
|
$table->foreign('wi_id')
|
|
->references('id')->on('warehouseitems')
|
|
->onDelete('cascade');
|
|
|
|
$table->integer('num_of_item');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('decisionitems');
|
|
}
|
|
}
|