Migrator.php 968 B

123456789101112131415161718192021222324252627
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: yunwuxin <448901948@qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace think\migration;
  12. use Phinx\Migration\AbstractMigration;
  13. use think\migration\db\Table;
  14. class Migrator extends AbstractMigration
  15. {
  16. /**
  17. * @param string $tableName
  18. * @param array $options
  19. * @return Table
  20. */
  21. public function table($tableName, $options = [])
  22. {
  23. return new Table($tableName, $options, $this->getAdapter());
  24. }
  25. }