fix order of upgrade commands

This commit is contained in:
Matthew Exon 2022-10-02 21:29:16 +02:00
parent f562a6b232
commit dd27611f6d

View file

@ -37,11 +37,11 @@ function retriever_install() {
if (DI::config()->get('retriever', 'dbversion') == '0.14') {
if (!DBA::e("ALTER TABLE `retriever_rule` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci") ||
!DBA::e("ALTER TABLE `retriever_item` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci") ||
!DBA::e("ALTER TABLE `retriever_item` MODIFY `item-uri` varbinary(255) NOT NULL") ||
!DBA::e("ALTER TABLE `retriever_resource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci") ||
!DBA::e("ALTER TABLE `retriever_item` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci") ||
!DBA::e("ALTER TABLE `retriever_resource` MODIFY `url` varbinary(700) NOT NULL") ||
!DBA::e("ALTER TABLE `retriever_resource` MODIFY `redirect-url` varbinary(700) NOT NULL")) {
!DBA::e("ALTER TABLE `retriever_resource` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci") ||
Logger::warning('Unable to update database tables: ' . DBA::errorMessage());
return;
}