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

[BUG]安装时数据库无法migrate #1759

Closed
xiaowuap opened this issue Jan 15, 2023 · 4 comments
Closed

[BUG]安装时数据库无法migrate #1759

xiaowuap opened this issue Jan 15, 2023 · 4 comments
Labels
invalid-issue the fuck is this?

Comments

@xiaowuap
Copy link

Environment 环境

OS: Debian11
PHP version: 8.2
DB version: 5.7.37
Commit: 2022.12

Bug Info

Describe the issue you run into. 请描述你遇到的问题。
安装进行到这一步时出错:php vendor/bin/phinx migrate
数据库密码正常设置,已尝试自己搜索去掉了sql的strict mode`php vendor/bin/phinx migrate
Phinx by CakePHP - https://phinx.org.

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

  • /www/wwwroot/我的域名/db/migrations
    using seed paths
  • /www/wwwroot/我的域名/db/seeds
    warning no environment specified, defaulting to: production
    using adapter mysql
    using database proxy_xiaowuap_c
    ordering by creation time

== 20000101000000 InitDatabase: migrating
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'custom_config' can't have a default value in /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:192
Stack trace:
#0 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(192): PDO->exec()
#1 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php(358): Phinx\Db\Adapter\PdoAdapter->execute()
#2 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(349): Phinx\Db\Adapter\MysqlAdapter->createTable()
#3 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(113): Phinx\Db\Adapter\AdapterWrapper->createTable()
#4 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(146): Phinx\Db\Adapter\TimedOutputAdapter->createTable()
#5 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(719): Phinx\Db\Plan\Plan->execute()
#6 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(615): Phinx\Db\Table->executeActions()
#7 /www/wwwroot/我的域名/db/migrations/20000101000000_init_database.php(93): Phinx\Db\Table->create()
#8 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): InitDatabase->up()
#9 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(388): Phinx\Migration\Manager\Environment->executeMigration()
#10 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(359): Phinx\Migration\Manager->executeMigration()
#11 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager->migrate()
#12 /www/wwwroot/我的域名/vendor/symfony/console/Command/Command.php(312): Phinx\Console\Command\Migrate->execute()
#13 /www/wwwroot/我的域名/vendor/symfony/console/Application.php(1022): Symfony\Component\Console\Command\Command->run()
#14 /www/wwwroot/我的域名/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand()
#15 /www/wwwroot/我的域名/vendor/robmorgan/phinx/src/Phinx/Console/PhinxApplication.php(70): Symfony\Component\Console\Application->doRun()
#16 /www/wwwroot/我的域名/vendor/symfony/console/Application.php(168): Phinx\Console\PhinxApplication->doRun()
#17 /www/wwwroot/我的域名/vendor/robmorgan/phinx/bin/phinx(28): Symfony\Component\Console\Application->run()
#18 /www/wwwroot/我的域名/vendor/bin/phinx(120): include('...')
#19 {main}
root@xiaowuap:/www/wwwroot/我的域名# select @@sql_mode`

@xiaowuap
Copy link
Author

sql输入select @@sql_mode返回NO_ENGINE_SUBSTITUTION

@AutisticShark AutisticShark added invalid-issue the fuck is this? and removed bug-user-report labels Jan 17, 2023
@johnsy616
Copy link

你好这个问题解决了吗?我也遇到一样的问题

@johnsy616
Copy link

IMG_20230123_215523_edit_1223914395370016
如图所示

@ligongfu
Copy link
Contributor

ligongfu commented Aug 15, 2023

俺也一样,我是在全新安装时遇到的

# php xcat Migration new
Current database version 0.

Found migration version 2023020100.
Found migration version 2023021600.
Found migration version 2023030500.
Found migration version 2023031700.
Found migration version 2023031701.
Found migration version 2023032600.
Found migration version 2023050800.
Found migration version 2023053000.
Found migration version 2023060300.
Found migration version 2023061800.
Found migration version 2023063000.
Found migration version 2023071000.
Found migration version 2023071600.
Found migration version 2023071700.
Found migration version 2023072000.
Found migration version 2023080900.

Forward to 2023020100
PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT 'Telegram ID'

sql输入select @@sql_mode同样是返回NO_ENGINE_SUBSTITUTION

已经找到原因,#2120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid-issue the fuck is this?
Projects
None yet
Development

No branches or pull requests

4 participants