Forráskód Böngészése

refactor(system): 更新数据库迁移路径获取方式

- 移除对 SixShop\Core\Helper 的依赖
- 使用 SixShop\Core\extension_path 函数替代 Helper::extension_path 方法
- 确保迁移文件路径拼接逻辑保持一致
- 更新类的命名空间引入以支持新的函数调用方式
runphp 3 hónapja
szülő
commit
fe24c61ef2
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/Migrate.php

+ 2 - 2
src/Migrate.php

@@ -9,10 +9,10 @@ use Phinx\Db\Adapter\AdapterInterface;
 use Phinx\Migration\AbstractMigration;
 use Phinx\Migration\MigrationInterface;
 use Phinx\Util\Util;
-use SixShop\Core\Helper;
 use SixShop\System\Model\MigrationsModel;
 use think\App;
 use think\Model;
+use function SixShop\Core\extension_path;
 
 class Migrate
 {
@@ -28,7 +28,7 @@ class Migrate
     {
         $this->app = $app;
         $this->moduleName = $moduleName;
-        $this->path = Helper::extension_path($this->moduleName) . 'database' . DIRECTORY_SEPARATOR . 'migrations';
+        $this->path = extension_path($this->moduleName) . 'database' . DIRECTORY_SEPARATOR . 'migrations';
         $this->migrations = $this->getMigrations();
         $this->input = null;
         $this->output = null;