Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vendor/bin/phinx migrate 报错 #1524

Closed
myitcloud opened this issue Aug 17, 2022 · 4 comments
Closed

vendor/bin/phinx migrate 报错 #1524

myitcloud opened this issue Aug 17, 2022 · 4 comments

Comments

@myitcloud
Copy link

myitcloud commented Aug 17, 2022

dev 分支
服务器环境 ubuntu 20.04
aapanel
MariaDB 10.3.32 + PHP-8.1 Nginx 1.20.1 phpMyAdmin 5.0

执行数据库迁移
vendor/bin/phinx migrate

报错
Phinx by CakePHP - https://phinx.org.

using config file phinx.php
using config parser php
using migration paths

  • /www/wwwroot/vpn/db/migrations
    using seed paths
  • /www/wwwroot/vpn/db/seeds
    warning no environment specified, defaulting to: production
    using adapter mysql
    using database sspanel
    ordering by creation time

== 20000101000000 InitDatabase: migrating
== 20000101000000 InitDatabase: migrated 0.2018s

== 20220109130532 CreateStreamMediaTable: migrating
== 20220109130532 CreateStreamMediaTable: migrated 0.0042s

== 20220505044345 StringToText: migrating
== 20220505044345 StringToText: migrated 0.0482s

== 20220514172426 AdjustConfigurationTableValueFieldLength: migrating
== 20220514172426 AdjustConfigurationTableValueFieldLength: migrated 0.0064s

== 20220522184308 FixUserMoneyField: migrating
== 20220522184308 FixUserMoneyField: migrated 0.0101s

== 20220814175532 DropGConfigTable: migrating
PDOException: SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'sspanel.gconfig' in /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:193
Stack trace:
#0 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(193): PDO->exec()
#1 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php(119): Phinx\Db\Adapter\PdoAdapter->execute()
#2 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(611): Phinx\Db\Util\AlterInstructions->execute()
#3 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(972): Phinx\Db\Adapter\PdoAdapter->executeAlterSteps()
#4 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(484): Phinx\Db\Adapter\PdoAdapter->executeActions()
#5 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(420): Phinx\Db\Adapter\AdapterWrapper->executeActions()
#6 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(151): Phinx\Db\Adapter\TimedOutputAdapter->executeActions()
#7 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(715): Phinx\Db\Plan\Plan->execute()
#8 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(623): Phinx\Db\Table->executeActions()
#9 /www/wwwroot/vpn/db/migrations/20220814175532_drop_g_config_table.php(11): Phinx\Db\Table->update()
#10 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): DropGConfigTable->up()
#11 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(385): Phinx\Migration\Manager\Environment->executeMigration()
#12 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(359): Phinx\Migration\Manager->executeMigration()
#13 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager->migrate()
#14 /www/wwwroot/vpn/vendor/symfony/console/Command/Command.php(308): Phinx\Console\Command\Migrate->execute()
#15 /www/wwwroot/vpn/vendor/symfony/console/Application.php(998): Symfony\Component\Console\Command\Command->run()
#16 /www/wwwroot/vpn/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#17 /www/wwwroot/vpn/vendor/robmorgan/phinx/src/Phinx/Console/PhinxApplication.php(70): Symfony\Component\Console\Application->doRun()
#18 /www/wwwroot/vpn/vendor/symfony/console/Application.php(171): Phinx\Console\PhinxApplication->doRun()
#19 /www/wwwroot/vpn/vendor/robmorgan/phinx/bin/phinx(28): Symfony\Component\Console\Application->run()
#20 /www/wwwroot/vpn/vendor/bin/phinx(120): include('...')
#21 {main}

@myitcloud myitcloud changed the title [BUG] vendor/bin/phinx migrate 报错 Aug 17, 2022
@lchkid
Copy link

lchkid commented Aug 18, 2022

same problem

ubuntu 22.04 cloudpanel PHP8.1

看起来马上有fix了

@AutisticShark
Copy link
Contributor

等我解決這個CI的問題就能合了,如果急著用可以先自己改一下文件。

@myitcloud
Copy link
Author

等我解決這個CI的問題就能合了,如果急著用可以先自己改一下文件。

大佬 咋改哇,改哪些文件哇

@AutisticShark
Copy link
Contributor

Fixed in #1528 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants