20220416172613_delete_old_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. declare(strict_types=1);
  3. use Phinx\Migration\AbstractMigration;
  4. final class DeleteOldTable extends AbstractMigration
  5. {
  6. /**
  7. * Change Method.
  8. *
  9. * Write your reversible migrations using this method.
  10. *
  11. * More information on writing migrations is available here:
  12. * https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
  13. *
  14. * Remember to call "create()" or "update()" and NOT "save()" when working
  15. * with the Table class.
  16. */
  17. public function change(): void
  18. {
  19. $this->table('blockip')
  20. ->drop()
  21. ->update();
  22. $this->table('bought')
  23. ->drop()
  24. ->update();
  25. $this->table('code')
  26. ->drop()
  27. ->update();
  28. $this->table('detect_ban_log')
  29. ->drop()
  30. ->update();
  31. $this->table('paylist')
  32. ->drop()
  33. ->update();
  34. $this->table('shop')
  35. ->drop()
  36. ->update();
  37. $this->table('unblockip')
  38. ->drop()
  39. ->update();
  40. $this->table('user_hourly_usage')
  41. ->drop()
  42. ->update();
  43. }
  44. }