Merge pull request #4633 from turbo124/v5-develop

Make status_sort_order nullable
This commit is contained in:
David Bomba 2021-01-06 08:54:06 +11:00 committed by GitHub
commit 08110af625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
<?php <?php
use App\Models\Task;
use App\Models\TaskStatus; use App\Models\TaskStatus;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
@ -106,6 +107,7 @@ class ImproveDecimalResolution extends Migration
Schema::table('tasks', function (Blueprint $table) { Schema::table('tasks', function (Blueprint $table) {
$table->decimal('rate', 20, 6)->change(); $table->decimal('rate', 20, 6)->change();
$table->integer('status_sort_order')->nullable()->default(null)->change();
}); });
Schema::table('tax_rates', function (Blueprint $table) { Schema::table('tax_rates', function (Blueprint $table) {
@ -131,9 +133,9 @@ class ImproveDecimalResolution extends Migration
}); });
Task::query()->update(['status_sort_order' => NULL]);
TaskStatus::query()->update(['status_sort_order' => NULL]); TaskStatus::query()->update(['status_sort_order' => NULL]);
} }
/** /**