mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-23 06:24:07 +00:00
60 lines
1.6 KiB
PHP
60 lines
1.6 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateSoitemsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('soitems', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
// foreign key for the so table
|
|
$table->unsignedInteger('so_id');
|
|
$table->foreign('so_id')
|
|
->references('id')->on('sos')
|
|
->onDelete('cascade')
|
|
->onUpdate('cascade');
|
|
$table->Integer('status')->default('0');
|
|
|
|
//Item details
|
|
$table->integer('order_id');
|
|
$table->integer('brand_no');
|
|
$table->integer('model_no');
|
|
$table->integer('item_code');
|
|
$table->string('quantity_of_item');
|
|
$table->string('uom');
|
|
|
|
//Packaging details
|
|
$table->integer('quantity_of_carton');
|
|
$table->string('packaging_type');
|
|
|
|
//Measurement details
|
|
$table->double('packaging_height');
|
|
$table->double('packaging_width');
|
|
$table->double('packaging_depth');
|
|
|
|
//Weight details
|
|
$table->double('packaging_gross');
|
|
$table->double('packaging_nett');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('soitems');
|
|
}
|
|
}
|