diff --git a/database/migrations/2021_06_07_155421_add_serial_number_indexes.php b/database/migrations/2021_06_07_155421_add_serial_number_indexes.php new file mode 100644 index 0000000000000000000000000000000000000000..3673489c7e5c1646a0e8d1443ff66179610f9f98 --- /dev/null +++ b/database/migrations/2021_06_07_155421_add_serial_number_indexes.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class AddSerialNumberIndexes extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('assets', function (Blueprint $table) { + $table->index(['serial']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('assets', function (Blueprint $table) { + $table->dropIndex(['serial']); + }); + } +}