20230407174006_delete_customer_wx_field.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use think\migration\Migrator;
  3. use think\migration\db\Column;
  4. use think\facade\Db;
  5. use app\model\Customer;
  6. class DeleteCustomerWxField extends Migrator
  7. {
  8. /**
  9. * Change Method.
  10. *
  11. * Write your reversible migrations using this method.
  12. *
  13. * More information on writing migrations is available here:
  14. * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
  15. *
  16. * The following commands can be used in this method and Phinx will
  17. * automatically reverse them when rolling back:
  18. *
  19. * createTable
  20. * renameTable
  21. * addColumn
  22. * renameColumn
  23. * addIndex
  24. * addForeignKey
  25. *
  26. * Remember to call "create()" or "update()" and NOT "save()" when working
  27. * with the Table class.
  28. */
  29. public function change()
  30. {
  31. //删除表废弃字段
  32. Db::query("alter table fl_customer drop wx;");
  33. Db::query("alter table fl_customer_recycle drop wx;");
  34. Db::query("alter table fl_customer_drop_pool drop wx;");
  35. }
  36. }