OTRS 3.0 升级至 3.1 失败

OTRS 3.0 升级至 3.1 失败

今天我开始将 OTRS 从 2.3 版升级到 2.4 版,从 2.4 版升级到 3.0 版,从 3.0 版升级到 3.1 版。除了从 3.0 版升级到 3.1 版之外,其他一切都很顺利。OTRS 提供了一些 perl 脚本,使升级更加容易。我在每个升级步骤中都使用了这些脚本。使用升级脚本后,从 3.0 版升级到 3.1 版时出现以下失败。

scripts/DBUpdate-to-3.1.pl

错误是:

root@tickets:/opt/otrs# su - otrs
$ scripts/DBUpdate-to-3.1.pl

Migration started...

Step 1 of 24: Refresh configuration cache... 
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm line 5.
Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAuto.pm line 4.
done.

Step 2 of 24: Check framework version... done.

Step 3 of 24: Creating DynamicField tables (if necessary)... done.

DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`pp_otrs`.`dynamic_field`, CONSTRAINT `FK_dynamic_field_create_by_id` FOREIGN KEY (`create_by`) REFERENCES `users` (`id`)) at /opt/otrs-3.1.10/Kernel/System/DB.pm line 478.
ERROR: OTRS-DBUpdate-to-3.1-10 Perl: 5.14.2 OS: linux Time: Wed Sep  5 15:36:20 2012

 Message: Cannot add or update a child row: a foreign key constraint fails (`pp_otrs`.`dynamic_field`, CONSTRAINT `FK_dynamic_field_create_by_id` FOREIGN KEY (`create_by`) REFERENCES `users` (`id`)), SQL: 'INSERT INTO dynamic_field (name, label, field_order, field_type, object_type, config,
                            valid_id, create_time, create_by, change_time, change_by)
                        VALUES (?, ?, ?, 'Text', 'Ticket', '--- {}
', 1, 
        '2012-09-05 15:36:20'
    , 1, 
        '2012-09-05 15:36:20'
    , 1)'

 Traceback (20405): 
   Module: main::_DynamicFieldCreation (v1.85) Line: 466
   Module: scripts/DBUpdate-to-3.1.pl (v1.85) Line: 95

Could not create new DynamicField TicketFreeKey1 at scripts/DBUpdate-to-3.1.pl line 477.
Step 4 of 24: Create new dynamic fields for free fields (text, key, date)... $ 

其他人遇到过同样的问题吗?提前致谢

答案1

您能否执行一条 SQL 语句:

SELECT id, login FROM users WHERE id < 5;

因为我认为您的用户 1 不再存在?

相关内容