2023_05_29_142353_alert_company_fidle.php 922 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::table("user_company", function (Blueprint $t) {
  14. $t->string("department")->default("");
  15. $t->string("tel")->default("");
  16. $t->string("address")->default("");
  17. $t->string("linkman")->default("")->comment("联系人名称");
  18. });
  19. }
  20. /**
  21. * Reverse the migrations.
  22. *
  23. * @return void
  24. */
  25. public function down()
  26. {
  27. Schema::table("user_company", function (Blueprint $t) {
  28. $t->dropColumn("department");
  29. $t->dropColumn("tel");
  30. $t->dropColumn("address");
  31. $t->dropColumn("linkman");
  32. });
  33. }
  34. };