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

从2.02更新到2.3.0失败 #268

Open
Bluecatzmv opened this issue Oct 30, 2024 · 2 comments
Open

从2.02更新到2.3.0失败 #268

Bluecatzmv opened this issue Oct 30, 2024 · 2 comments

Comments

@Bluecatzmv
Copy link

在线自动更新进行到数据库更新时失败,提示手动执行命令,手动执行同样失败。
手动进行更新安装后在线恢复数据库文件时同样失败。
环境:4.19.90-89.11.v2401.ky10.x86_64
PHP 7.2.34
nginx/1.21.5
Uploading eda36935f31fcb87108da7548438311.png…

@xiaohu2002
Copy link
Contributor

只能按照离线升级方式升级,不支持在线升级

@Coder-II
Copy link

Coder-II commented Nov 4, 2024

没用重要数据的话,可以从上版本直接覆盖新版本的,但是需要去调整数据格式,
你新建一个数据库,用安装包里的.sql文件初始化一下新版的,然后对比和当前用着的数据库中所有表结构的不同。
我偷懒这么干了,对比下改了comment、session、failedlogin、admincp_session这几个表的某些字段,然后就升级成功了。

-- 列出当前数据库中的所有表结构
SELECT TABLE_NAME, COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_KEY, EXTRA
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'dzz'
ORDER BY TABLE_NAME, ORDINAL_POSITION;

-- 列出新版数据库中的所有表结构
SELECT TABLE_NAME, COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_KEY, EXTRA
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'dzztemp'
ORDER BY TABLE_NAME, ORDINAL_POSITION;

然后保存为2个文本文件,用diff命令查看不同之处。
discuss开头的和task开头的表我没管。

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