3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-05 08:45:36 +00:00

Merge pull request #9679 from tulsaschoolsdata/serial-number-indexes

Fixed #8486: Add index for asset serial number
This commit is contained in:
snipe
2021-06-09 17:36:06 -07:00
committed by GitHub

View File

@ -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']);
});
}
}