make field in china bank slips nullable

This commit is contained in:
Jack Goh
2018-08-02 14:26:19 +08:00
parent d2f5cade81
commit 3339ebe1ce
2 changed files with 43 additions and 1 deletions
@@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class MakeNullableInChinaBankSlipsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('china_bank_slips', function (Blueprint $table) {
$table->string('company_name')->nullable()->change();
$table->string('bank_name')->nullable()->change();
$table->string('acc_no')->nullable()->change();
$table->string('bank_address')->nullable()->change();
$table->string('swift')->nullable()->change();
$table->string('cnap')->nullable()->change();
$table->string('bank_branch')->nullable()->change();
$table->string('order_id')->nullable()->change();
$table->decimal('transfer_amount_needed')->nullable()->change();
$table->decimal('actual_transfer_amount')->nullable()->change();
$table->string('date')->nullable()->change();
$table->string('details')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('china_bank_slips', function (Blueprint $table) {
//
});
}
}
-1
View File
@@ -56,7 +56,6 @@ class ChinaBankSlipTest extends TestCase
'details' => "123123",
'date' => "123123"
]);
if(!file_exists($china_bank_slips_path) || $size_in_kb > 3072){
$response->assertStatus(400);
}