Текущая версия системы: 4.0.5, Postgresql: 8.4.
Хочу обновиться до последней OTRS с Postgresql 9.4.
Для этого использовал инструкцию: http://doc.otrs.com/doc/manual/admin/5. ... ading.html
1. Снял дамп базы в 8.4:
Код: Выделить всё
root@otrs:/var/lib/apt# pg_dump -h localhost -U "otrs" -W -v -Fc --file=14apr
Код: Выделить всё
root@debian87:/home/dee# pg_restore --dbname=otrs -v -U otrs -W 14apr
4. После рестора БД сделал вакууминг:
Код: Выделить всё
root@debian87:/opt/otrs# su postgres
postgres@debian87:/opt/otrs$ vacuumdb -a -z
vacuumdb: vacuuming database "otrs
Код: Выделить всё
shell> cd /opt/otrs/
shell> cat scripts/DBUpdate-to-5.postgresql.sql | psql --set ON_ERROR_STOP=on --single-transaction otrs otrs
К сожалению, я не нагуглил ничего конкретного, посвятил этому несколько дней, но дальше продвинуться не удалось.Migration started...
Step 1 of 18: Refresh configuration cache...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
done.
Step 2 of 18: Check framework version...done.
Step 3 of 18: Migrate Database Column Types...[Thu Apr 13 13:39:27 2017] DBUpdate-to-5.pl: DBD::Pg::db do failed: ERROR: cannot alter type of a column used by a view or rule
[Thu Apr 13 13:39:27 2017] DBUpdate-to-5.pl: DETAIL: rule _RETURN on view support_team_stats depends on column "id" at /opt/otrs/Kernel/System/DB.pm line 461.
ERROR: OTRS-DBUpdate-to-5.pl-62 Perl: 5.20.2 OS: linux Time: Thu Apr 13 13:39:27 2017
Message: ERROR: cannot alter type of a column used by a view or rule
DETAIL: rule _RETURN on view support_team_stats depends on column "id", SQL: 'ALTER TABLE ticket ALTER id TYPE BIGINT'
Traceback (11708):
Module: main::_MigrateDatabaseColumnTypes Line: 338
Module: scripts/DBUpdate-to-5.pl Line: 166
ERROR: OTRS-DBUpdate-to-5.pl-62 Perl: 5.20.2 OS: linux Time: Thu Apr 13 13:39:27 2017
Message: Error during execution of 'ALTER TABLE ticket ALTER id TYPE BIGINT'!
Traceback (11708):
Module: main::_MigrateDatabaseColumnTypes Line: 340
Module: scripts/DBUpdate-to-5.pl Line: 166
error.
[Thu Apr 13 13:39:27 2017] DBUpdate-to-5.pl: Died at scripts/DBUpdate-to-5.pl line 171.
Возможно, что правильнее будет апдейтнуть отдельно ОТРС, без апдейта postgresql. Но на старом софте не особо хотелось бы работать.
Заранее спасибо всем, кто поучаствует.