ich will OTRS 3.2.9 unter Debian mit MySQL Datenbank auf Version 3.3.9 Updaten und bin nach der offiziellen Anleitung im admin book vorgegangen.
Alle MySQL Datenbanktabellen habe ich vorher nach "InnoDB" umgewandelt, das Skript otrs.CheckDB.pl mahnt keine Tabellen mehr an, Standard Engine von MySQL ist auf InnoDB gesetzt.
Code: Select all
root:/opt/otrs# ./bin/otrs.CheckDB.pl
Trying to connect to database
DSN: DBI:mysql:database=otrs;host=localhost;
DatabaseUser: otrs
Connected.
Code: Select all
root:/opt/otrs# cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs
Enter password:
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
Code: Select all
root:/opt/otrs/scripts# su -m otrs -c "./DBUpdate-to-3.3.pl"
Migration started...
Step 1 of 13: Refresh configuration cache...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
[Fri Oct 24 11:24:36 2014] DBUpdate-to-3.3.pl: Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm line 7.
[Fri Oct 24 11:24:36 2014] DBUpdate-to-3.3.pl: Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAuto.pm line 7.
done.
Step 2 of 13: Check framework version... done.
Step 3 of 13: Generate MessageID md5sums... done.
Step 4 of 13: Migrate old settings... done.
Step 5 of 13: Migrate OTRSExternalTicketNumberRecognition... done.
Step 6 of 13: Checking Standard Template table columns...
Check if 'template_type' columns exists.
'template_type' column not found, create it.
ALTER TABLE standard_template ADD template_type VARCHAR (100) NULL
UPDATE standard_template SET template_type = 'Answer' WHERE template_type IS NULL
ALTER TABLE standard_template CHANGE template_type template_type VARCHAR (100) DEFAULT 'Answer' NOT NULL
done.
Step 7 of 13: Updating Queue Standard Template relations table...
Cleaning queue_standard_template table
Creating new Foreign Keys for queue_standard_template table
--- Note: ---
If you have already run this script before then the Foreign Keys are already set and you might see errors regarding 'duplicate key' or 'constrain already exists', that's fine, no need to worry!
---
ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_standard_template_id_id FOREIGN KEY (standard_template_id) REFERENCES standard_template (id)
ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)
[Fri Oct 24 11:24:41 2014] DBUpdate-to-3.3.pl: DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`otrs`.`#sql-b6f_285f1`, CONSTRAINT `FK_queue_standard_template_queue_id_id` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`id`)) at /opt/otrs/Kernel/System/DB.pm line 499.
ERROR: OTRS-DBUpdate-to-3.3-01 Perl: 5.14.2 OS: linux Time: Fri Oct 24 11:24:41 2014
Message: Cannot add or update a child row: a foreign key constraint fails (`otrs`.`#sql-b6f_285f1`, CONSTRAINT `FK_queue_standard_template_queue_id_id` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`id`)), SQL: 'ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)'
Traceback (16587):
Module: main::_AddQueueStandardTemplateForeignKeys (unknown version) Line: 557
Module: ./DBUpdate-to-3.3.pl (unknown version) Line: 133
ERROR: OTRS-DBUpdate-to-3.3-01 Perl: 5.14.2 OS: linux Time: Fri Oct 24 11:24:41 2014
Message: Error during execution of 'ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)'!
Traceback (16587):
Module: main::_AddQueueStandardTemplateForeignKeys (unknown version) Line: 559
Module: ./DBUpdate-to-3.3.pl (unknown version) Line: 133
done.
Step 8 of 13: Migrate OTRSGenericStandardTemplates... done.
Step 9 of 13: Checking if ACL tables already exist... Check if ACL table exists.
ACL tables not found, create it.
CREATE TABLE acl (
id INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR (200) NOT NULL,
comments VARCHAR (250) NULL,
description VARCHAR (250) NULL,
valid_id SMALLINT NOT NULL,
stop_after_match SMALLINT NULL,
config_match LONGBLOB NULL,
config_change LONGBLOB NULL,
create_time DATETIME NOT NULL,
create_by INTEGER NOT NULL,
change_time DATETIME NOT NULL,
change_by INTEGER NOT NULL,
PRIMARY KEY(id),
UNIQUE INDEX acl_name (name)
)
CREATE TABLE acl_sync (
acl_id VARCHAR (200) NOT NULL,
sync_state VARCHAR (30) NOT NULL,
create_time DATETIME NOT NULL,
change_time DATETIME NOT NULL
)
ALTER TABLE acl ADD CONSTRAINT FK_acl_create_by_id FOREIGN KEY (create_by) REFERENCES users (id)
ALTER TABLE acl ADD CONSTRAINT FK_acl_change_by_id FOREIGN KEY (change_by) REFERENCES users (id)
ALTER TABLE acl ADD CONSTRAINT FK_acl_valid_id_id FOREIGN KEY (valid_id) REFERENCES valid (id)
done.
Step 10 of 13: Uninstall Merged Feature Add-Ons... done.
Step 11 of 13: Delete the files that are not longer needed... done.
Step 12 of 13: Clean up the cache... done.
Step 13 of 13: Refresh configuration cache another time...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
[Fri Oct 24 11:24:44 2014] DBUpdate-to-3.3.pl: Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm line 7.
[Fri Oct 24 11:24:44 2014] DBUpdate-to-3.3.pl: Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAuto.pm line 7.
done.
Migration completed!