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] 数据库升级报错IF NOT EXISTS gateway varchar(255) NOT NULL DEFAULT ''' #1834

Closed
34556676 opened this issue Mar 17, 2023 · 5 comments

Comments

@34556676
Copy link

Environment 环境

OS: centos7.9
PHP version: 8.2
DB version: 8.0
Commit:

Bug Info

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 MySQL server version for the right syntax to use near 'IF NOT EXISTS gateway varchar(255) NOT NULL DEFAULT ''' at line 1 in /www/wwwroot/sspanel/db/migrations/2023031701-add_paylist_gateway.php:11

@34556676
Copy link
Author

BLOB, TEXT, GEOMETRY or JSON column 'remark' can't have a default value

@AutisticShark AutisticShark closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2023
@34556676
Copy link
Author

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 MySQL server version for the right syntax to use near 'IF NOT EXISTS gateway varchar(255) NOT NULL DEFAULT ''' at line 1 in /www/wwwroot/sspanel/db/migrations/2023031701-add_paylist_gateway.php:11
Stack trace:
#0 /www/wwwroot/sspanel/db/migrations/2023031701-add_paylist_gateway.php(11): PDO->exec()
#1 /www/wwwroot/sspanel/src/Command/Migration.php(103): App\Interfaces\MigrationInterface@anonymous->up()
#2 /www/wwwroot/sspanel/xcat(51): App\Command\Migration->boot()
#3 {main}
thrown in /www/wwwroot/sspanel/db/migrations/2023031701-add_paylist_gateway.php on line 11

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 MySQL server version for the right syntax to use near 'IF NOT EXISTS gateway varchar(255) NOT NULL DEFAULT ''' at line 1 in /www/wwwroot/sspanel/db/migrations/2023031701-add_paylist_gateway.php:11
Stack trace:
#0 /www/wwwroot/sspanel/db/migrations/2023031701-add_paylist_gateway.php(11): PDO->exec()
#1 /www/wwwroot/sspanel/src/Command/Migration.php(103): App\Interfaces\MigrationInterface@anonymous->up()
#2 /www/wwwroot/sspanel/xcat(51): App\Command\Migration->boot()
#3 {main}
thrown in /www/wwwroot/sspanel/db/migrations/2023031701-add_paylist_gateway.php on line 11
@M1Screw

@34556676
Copy link
Author

这个不修修吗

@AutisticShark
Copy link
Contributor

關閉嚴格模式。

@34556676
Copy link
Author

已解决。宝塔用户修改mysql配置文件参数:sql_mode=NO_ENGINE_SUBSTITUTION

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

No branches or pull requests

2 participants