Make purchase cost default to null

I don’t know why I need to do this?
This commit is contained in:
snipe 2016-08-30 08:52:33 -07:00
parent 2c18bc24a7
commit 6f89699f1a

View file

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class MakePurchaseCostNullable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('assets', function ($table) {
$table->decimal('purchase_cost',8,2)->nullable()->default(null)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}