2020_09_28_111811_change_order_tracking.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class ChangeOrderTracking extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. //
  15. Schema::table('order_trackings', function (Blueprint $table) {
  16. $table->decimal('gross_weight')->nullable()->comment('重KG');
  17. $table->decimal('bulk')->nullable()->comment('体积m3');
  18. });
  19. Schema::table('order_issues', function (Blueprint $table) {
  20. $table->timestamp('settlement_at')->nullable()->index()->comment('解决时间');
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. //
  31. Schema::table('order_trackings', function (Blueprint $table) {
  32. $table->dropColumn('gross_weight');
  33. $table->dropColumn('bulk');
  34. });
  35. Schema::table('order_issues', function (Blueprint $table) {
  36. $table->dropColumn('settlement_at');
  37. });
  38. }
  39. }