Johannes wrote: ↑24 Feb 2025, 20:48
Code: Select all
+----------------+-----------------+--------------------------------------+-----------------------+------------------------+
| TABLE_NAME | COLUMN_NAME | CONSTRAINT_NAME | REFERENCED_TABLE_NAME | REFERENCED_COLUMN_NAME |
+----------------+-----------------+--------------------------------------+-----------------------+------------------------+
| article | article_type_id | FK_article_article_type_id_id | article_type | id |
| article_search | article_type_id | FK_article_search_article_type_id_id | article_type | id |
+----------------+-----------------+--------------------------------------+-----------------------+------------------------+
2 rows in set (0.004 sec)
Those two are default.
So you could either manually drop it or retry with the script. Never had this before tbh.
My guess is that another run was not successful, when modifying the article table for example and now you are "stuck".
The script does not rely on anything special. Just remove it manually and you are good.
Regards
Johannes
If the FK is native and there´s no command to DROP the FK, i can´t understand how the script should work
Anyways, I manually dropped the foreignkey and ran the script again
Now i got the following output:
Code: Select all
Executing tasks ...
Step 1 of 49: Check framework version ...
Step 2 of 49: Check required Perl version ...
Step 3 of 49: Check required database version ...
Step 4 of 49: Check database charset ...
Step 5 of 49: Check required Perl modules ...
Step 6 of 49: Check installed CPAN modules for known vulnerabilities ...
Collecting all installed modules. This can take a while...
No advisories found
Step 7 of 49: Check if database has been backed up ...
Step 8 of 49: Migrate PostMaster pre-filters that execute system commands ...
Step 9 of 49: Migrate dashboard widgets that execute system commands ...
Step 10 of 49: Upgrade database structure ...
- Add table for dynamic field object names and add an index to speed up searching dynamic field text values
- Add new sysconfig tables
- Remove no longer needed MD5 columns from some tables
- Add new communication channel table and insert data
- Change article table structure and prepare renaming of article tables
- Rename article tables
- Create new article table and change some table structures after renaming of article tables
- Add an index to the ticket_history table and add EmailResend ticket history type
- Add new tables for customer relations
- Add new table for chat data
- Change the password columns in the user/customer user tables
- Add new table for article search index
- Add new tables for communication logs
- Update notification tables
- Drop obsolete create_time_unix column from ticket table
- Replace column create_time_unix column by create_time column in ticket_index table
- Index article_data_mime table
- Fix user preference keys
- Blacklisted keys not found in user preference tables.
Step 11 of 49: Migrate configuration ...
If you see errors about 'Setting ... is invalid', that's fine, no need to worry!
This could happen because some config settings are no longer needed for OTRS 6
or you may have some packages installed, which will be migrated
in a later step (during the package upgrade).
The configuration migration can take some time, please be patient.
- AllSettingsCount: 98
- DisabledCount: 3
- MissingCount: 0
- UnsuccessfullCount: 0
Step 12 of 49: Refresh configuration cache after migration of OTRS 5 settings ...
Step 13 of 49: Migrating ticket storage configuration ...
Step 14 of 49: Migrating article search index configuration ...
Step 15 of 49: Migrating ticket zoom customer information widget configuration ...
Step 16 of 49: Drop deprecated table gi_object_lock_state ...
Step 17 of 49: Migrate PossibleNextActions setting ...
Step 18 of 49: Migrate ZoomExpand setting ...
There is no modified ZoomExpand config value, skipping migration...
Step 19 of 49: Migrating time zone configuration ...
Step 20 of 49: Migrating modified settings ...
Step 21 of 49: Create appointment calendar tables ...
Step 22 of 49: Create ticket number counter tables ...
- Table 'ticket_number_counter' already exists, skipping...
Step 23 of 49: Update calendar appointment future tasks ...
Step 24 of 49: Add basic appointment notification for reminders ...
Step 25 of 49: Create Form Draft tables ...
Step 26 of 49: Clean and drop group_user permission_value column ...
Step 27 of 49: Migrate GenericAgent jobs configuration ...
Step 28 of 49: Migrate TicketAppointment rules configuration ...
Step 29 of 49: Migrate Merged Ticket history name values ...
Step 30 of 49: Migrate ticket statistics ...
Step 31 of 49: Migrate ticket notifications ...
- Article types table missing, skipping...
Step 32 of 49: Create entries in new article table ...
- Article types table missing, skipping...
Step 33 of 49: Post changes on article related tables ...
- Article types table missing, skipping...
Step 34 of 49: Migrate ArticleType in ProcessManagement Data ...
Step 35 of 49: Migrate ArticleType in PostMaster filters ...
Step 36 of 49: Migrate chat articles ...
[Tue Feb 25 08:52:39 2025] DBUpdate-to-6.pl: DBD::mysql::st execute failed: Unknown column 'at.communication_channel_id' in 'where clause' at /opt/znuny-6.0.48/Kernel/System/DB.pm line 695.
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-55 Perl: 5.34.0 OS: linux Time: Tue Feb 25 08:52:39 2025
Message: Unknown column 'at.communication_channel_id' in 'where clause', SQL: '
SELECT COUNT(at.id)
FROM article_data_mime adm
JOIN article at ON adm.article_id = at.id
WHERE at.communication_channel_id = ?
'
Traceback (826413):
Module: scripts::DBUpdateTo6::MigrateChatData::_CheckChatArticles Line: 441
Module: scripts::DBUpdateTo6::MigrateChatData::Run Line: 56
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 156
Module: scripts::DBUpdateTo6::Run Line: 68
Module: scripts/DBUpdate-to-6.pl Line: 88
Step 37 of 49: Add history types ...
Step 38 of 49: Initialize default cron jobs ...
Copying /opt/otrs/var/cron/aaa_base.dist to /opt/otrs/var/cron/aaa_base...
done.
Copying /opt/otrs/var/cron/otrs_daemon.dist to /opt/otrs/var/cron/otrs_daemon...
done.
Step 39 of 49: Migrate web service configuration ...
Step 40 of 49: Migrate package repository configuration ...
- Setting 'Package::RepositoryList' is already modified in the system skipping...
Step 41 of 49: Migrate ticket search profiles ...
Step 42 of 49: Add missing foreign keys that point to database table "article" ...
Step 43 of 49: Remove Generic Agent system commands ...
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-55 Perl: 5.34.0 OS: linux Time: Tue Feb 25 08:57:55 2025
Message: Can't locate Kernel/System/DynamicField/Driver/TextMask.pm in @INC (you may need to install the Kernel::System::DynamicField::Driver::TextMask module) (@INC contains: /opt/znuny-6.0.48/Custom /opt/znuny-6.0.48/Kernel/cpan-lib /opt/znuny-6.0.48 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /opt/znuny-6.0.48/Kernel/System/Main.pm line 86.
Traceback (826413):
Module: Kernel::System::DynamicField::Backend::new Line: 87
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 308
Module: Kernel::System::ObjectManager::Get Line: 202
Module: Kernel::System::GenericAgent::new Line: 63
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 308
Module: Kernel::System::ObjectManager::Get Line: 202
Module: scripts::DBUpdateTo6::RemoveGenericAgentSystemCommandCalls::Run Line: 30
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 156
Module: scripts::DBUpdateTo6::Run Line: 68
Module: scripts/DBUpdate-to-6.pl Line: 88
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-55 Perl: 5.34.0 OS: linux Time: Tue Feb 25 08:57:55 2025
Message: Can't load dynamic field backend module for field type TextMask!
Traceback (826413):
Module: Kernel::System::DynamicField::Backend::new Line: 88
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 308
Module: Kernel::System::ObjectManager::Get Line: 202
Module: Kernel::System::GenericAgent::new Line: 63
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 308
Module: Kernel::System::ObjectManager::Get Line: 202
Module: scripts::DBUpdateTo6::RemoveGenericAgentSystemCommandCalls::Run Line: 30
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 156
Module: scripts::DBUpdateTo6::Run Line: 68
Module: scripts/DBUpdate-to-6.pl Line: 88
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-55 Perl: 5.34.0 OS: linux Time: Tue Feb 25 08:57:55 2025
Message: The constructor of Kernel::System::DynamicField::Backend returned undef.
Traceback (826413):
Module: Kernel::System::ObjectManager::_DieWithError Line: 629
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 316
Module: Kernel::System::ObjectManager::Get Line: 202
Module: Kernel::System::GenericAgent::new Line: 63
Module: Kernel::System::ObjectManager::_ObjectBuild Line: 308
Module: Kernel::System::ObjectManager::Get Line: 202
Module: scripts::DBUpdateTo6::RemoveGenericAgentSystemCommandCalls::Run Line: 30
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 156
Module: scripts::DBUpdateTo6::Run Line: 68
Module: scripts/DBUpdate-to-6.pl Line: 88
The constructor of Kernel::System::DynamicField::Backend returned undef. at /opt/znuny-6.0.48/Kernel/System/GenericAgent.pm line 63.
So, the script found a missing field:
Unknown column 'at.communication_channel_id' in 'where clause'
But despite the error log, it skipped this step
And later stopped the execution on another error:
Can't load dynamic field backend module for field type TextMask
This refers to an add-on I got installed on OTRS5, which I would update after migration process.
But if the migration breaks on unavailable modules, how can I finish the migration to update add-ons?
There´s some way to update without copying ZZZAuto.pm, and load this file later, after the migration?