2020_06_11_112028_change_rejected_bills_table.php 919 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class ChangeRejectedBillsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. * rejected_bills表 is_loaded,is_checked 字段添加索引
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('rejected_bills',function (Blueprint $table){
  15. $table->index('is_loaded','rejected_bills_is_loaded_index');
  16. $table->index('is_checked','rejected_bills_is_checked_index');
  17. });
  18. }
  19. /**
  20. * Reverse the migrations.
  21. *
  22. * @return void
  23. */
  24. public function down()
  25. {
  26. //
  27. Schema::table('rejected_bills',function (Blueprint $table){
  28. $table->dropIndex('rejected_bills_is_loaded_index');
  29. $table->dropIndex('rejected_bills_is_checked_index');
  30. });
  31. }
  32. }