2021_03_09_131039_change_procurements_time_column.php 820 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class ChangeProcurementsTimeColumn extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('procurements', function (Blueprint $table) {
  15. $table->dropColumn('time');
  16. $table->timestamp('deadline')->nullable()->comment('接单倒计时');
  17. });
  18. }
  19. /**
  20. * Reverse the migrations.
  21. *
  22. * @return void
  23. */
  24. public function down()
  25. {
  26. Schema::table('procurements', function (Blueprint $table) {
  27. $table->timestamp('time')->nullable()->comment('接单倒计时');
  28. $table->dropColumn('deadline');
  29. });
  30. }
  31. }