Skip to content

4.1.3 升级到 Pro 版失败,报错 constraint failed: NOT NULL constraint failed: new_shares.permissions #2609

@Logthm

Description

@Logthm

描述
从社区版 3.8.3 迁移到社区版 4.0.0 时没有报错,此后尝试升级到 Pro 版 4.0.0 时报错 Failed to upgrade to Pro: sql/schema: copy rows from old table "shares" to new temporary table "new_shares": constraint failed: NOT NULL constraint failed: new_shares.permissions (1299)

尝试先升级到社区版 4.1.3 后再升级到 Pro 版 4.1.3,仍然报错。数据库使用 SQLite。

复现

  1. cloudreve.exe migrate --v3-conf conf.ini -c data/conf.ini
  2. 使用 Pro 版 4.0.0 覆盖社区版 4.0.0
  3. cloudreve.exe proupgrade
  4. 提示 Failed to upgrade to Pro: sql/schema: copy rows from old table "shares" to new temporary table "new_shares": constraint failed: NOT NULL constraint failed: new_shares.permissions (1299)

预期行为
正确迁移数据库数据。

截图
log

尝试在 Windows 11 和 Ubuntu 2204 下进行迁移,均提示错误。
尝试了 4.0.0 以及之后的所有版本,均提示错误。

观察到社区版 4.1.3 的表里没有 permissions 字段,这个字段在 Pro 里是非 NULL 的。

Metadata

Metadata

Assignees

Labels

backlogbugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions