From 0fed8e88165ed5c84eb5ac3bba57174308e82118 Mon Sep 17 00:00:00 2001 From: zyimm Date: Wed, 11 Jan 2023 16:26:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/command/Migrate.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/command/Migrate.php b/src/command/Migrate.php index 8a10fe6..fb4e183 100644 --- a/src/command/Migrate.php +++ b/src/command/Migrate.php @@ -17,8 +17,6 @@ use Phinx\Db\Adapter\ProxyAdapter; use Phinx\Migration\AbstractMigration; use Phinx\Migration\MigrationInterface; use Phinx\Util\Util; -use think\console\Input; -use think\console\Output; use think\Exception; use think\facade\Env; use think\migration\Command; @@ -64,8 +62,8 @@ abstract class Migrate extends Command // Run the migration if (method_exists($migration, MigrationInterface::CHANGE)) { if (MigrationInterface::DOWN === $direction) { - // Create an instance of the ProxyAdapter so we can record all - // of the migration commands for reverse playback + // Create an instance of the ProxyAdapter, so we can record all + // the migration commands for reverse playback /** @var ProxyAdapter $proxyAdapter */ $proxyAdapter = AdapterFactory::instance()->getWrapper('proxy', $this->getAdapter()); $migration->setAdapter($proxyAdapter); @@ -87,7 +85,7 @@ abstract class Migrate extends Command } // Record it in the database - $this->getAdapter($migration->getDbConfig()) + $this->getAdapter() ->migrated($migration, $direction, date('Y-m-d H:i:s', $startTime), date('Y-m-d H:i:s', time())); $end = microtime(true);