2020_12_15_095959_add_customer_phone_address.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. protected $authorities = [
  8. "客户管理-客户-客户状态",
  9. "客户管理-客户-客户状态-查询",
  10. "客户管理-客户-客户状态-录入",
  11. "客户管理-客户-客户状态-编辑",
  12. "客户管理-客户-客户状态-删除",
  13. ];
  14. /**
  15. * Run the migrations.
  16. *
  17. * @return void
  18. */
  19. public function up()
  20. {
  21. Schema::table('customers', function (Blueprint $table) {
  22. $table->string('invoice_address')->nullable()->comment('发票地址');
  23. $table->string('contact_man')->index()->nullable()->comment('联系人');
  24. $table->integer('phone')->index()->nullable()->comment('联系电话');
  25. $table->string('remark')->nullable()->comment('公司备注');
  26. });
  27. }
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::table('customers',function (Blueprint $table){
  36. $table->dropColumn('invoice_address');
  37. $table->dropColumn('contact_man');
  38. $table->dropColumn('phone');
  39. $table->dropColumn('remark');
  40. });
  41. }
  42. }