fixed 表检测

This commit is contained in:
xxq250 2023-09-06 11:27:46 +08:00
parent b7cea34760
commit a37191350d
1 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,9 @@
class ChangeWebhookTaskFieldCharacter < ActiveRecord::Migration[5.2]
def change
Gitea::Base.connection.execute("ALTER TABLE `hook_task` MODIFY `payload_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
Gitea::Base.connection.execute("ALTER TABLE `hook_task` MODIFY `request_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
Gitea::Base.connection.execute("ALTER TABLE `hook_task` MODIFY `response_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
if Gitea::Base.connection.table_exists? :hook_task
Gitea::Base.connection.execute("ALTER TABLE `hook_task` MODIFY `payload_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
Gitea::Base.connection.execute("ALTER TABLE `hook_task` MODIFY `request_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
Gitea::Base.connection.execute("ALTER TABLE `hook_task` MODIFY `response_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
end
end
end