forgeplus/db/migrate/20230413121129_change_webho...

10 lines
600 B
Ruby

class ChangeWebhookTaskFieldCharacter < ActiveRecord::Migration[5.2]
def change
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