mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 04:24:00 +00:00
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreatePackages extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('packages', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->integer('list_id')->unsigned()->index();
|
|
$table->integer('type')->default(0);
|
|
$table->string('description')->nullable();
|
|
$table->decimal('width', 5, 3);
|
|
$table->decimal('length', 5, 3);
|
|
$table->decimal('height', 5, 3);
|
|
$table->integer('weight')->default(0);
|
|
$table->integer('quantity');
|
|
$table->timestamps();
|
|
|
|
$table->foreign('list_id')->references('id')->on('packing_lists');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('packages');
|
|
}
|
|
}
|