2020_12_15_095959_add_customer_phone_address.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class AddCustomerPhoneAddress extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::table('customers', function (Blueprint $table) {
  15. $table->string('invoice_address')->nullable()->comment('发票地址');
  16. $table->string('contact_man')->index()->nullable()->comment('联系人');
  17. $table->string('phone')->nullable()->comment('联系电话');
  18. $table->string('remark')->nullable()->comment('公司备注');
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down()
  27. {
  28. Schema::table('customers',function (Blueprint $table){
  29. $table->dropColumn('invoice_address');
  30. $table->dropColumn('contact_man');
  31. $table->dropColumn('phone');
  32. $table->dropColumn('remark');
  33. });
  34. }
  35. }