2019_12_23_175345_add_waybill_unit.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class AddWaybillUnit extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('waybills',function (Blueprint $table){
  15. $table->decimal('warehouse_weight_other')->nullable()->comment('仓库计数二');
  16. $table->bigInteger('warehouse_weight_unit_id_other')->nullable()->index()->comment('仓库计数单位二');
  17. $table->decimal('carrier_weight_other')->nullable()->comment('承运商计数二');
  18. $table->bigInteger('carrier_weight_unit_id_other')->nullable()->index()->comment('承运商计数单位二');
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down()
  27. {
  28. Schema::table('waybills', function (Blueprint $table) {
  29. $table->dropColumn('warehouse_weight_other');
  30. $table->dropColumn('warehouse_weight_unit_id_other');
  31. $table->dropColumn('carrier_weight_other');
  32. $table->dropColumn('carrier_weight_unit_id_other');
  33. });
  34. }
  35. }