Skip to content

Workflow KATA columns are utf8mb3 — can't store 4-byte UTF-8 (emoji) even for fields with utf8mb4 storage #1878

Description

@cerb

Summary

The workflow table's KATA columns (workflow_kata, config_kata, resources_kata, builder_kata) are mediumtext COLLATE utf8mb3_unicode_ci. That means a workflow can't contain any 4-byte UTF-8 character anywhere in its KATA — including in records whose eventual destination does support utf8mb4 (e.g. the custom_field_clobvalue.field_value column migrated in 11.2).

For example, a tutorial widget can't include an example emoji in a 'Text: Multiple Lines' description even when illustrating the new 11.2 utf8mb4 support — because the workflow source itself can't round-trip through the database.

Comparison

automation.script already does this correctly:

`script` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

workflow.*_kata should follow the same pattern.

Proposed fix

Migrate these columns in a 11.2.x patch (or 11.3.0):

  • workflow.workflow_kata
  • workflow.config_kata
  • workflow.resources_kata
  • workflow.builder_kata

…to mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, matching automation.script.

Where I hit it

Editing features/cerberusweb.core/workflows/cerb.tutorial.kata for the 11.2 update — wanted to drop an emoji into the custom-field 'Text: Multiple Lines' example as a self-referential demo of the new 4-byte support, and realized the workflow file itself can't survive the round-trip.

Schema reference

From install/sql/cerb_base_tables.sql:

CREATE TABLE \`workflow\` (
  ...
  \`workflow_kata\` mediumtext COLLATE utf8mb3_unicode_ci,
  \`config_kata\` mediumtext COLLATE utf8mb3_unicode_ci,
  \`resources_kata\` mediumtext COLLATE utf8mb3_unicode_ci,
  \`builder_kata\` mediumtext COLLATE utf8mb3_unicode_ci,
  ...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

vs.

CREATE TABLE \`automation\` (
  ...
  \`script\` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  ...
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions