Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29990

As an Administrator I want to translate ezselection Field Definition options

    Details

    • Sprint:
      [2.5] - Sprint 4
    • Story Points:
      1

      Description

      As described in EZP-29915, the options defined for ezselection Field Type Definition should be translatable.

      In order to do it, database schema upgrade is required.

      The Legacy Storage schema requires new table defined as follows:

      • For MySQL:

        DROP TABLE IF EXISTS ezcontentclass_attribute_ml;
        CREATE TABLE ezcontentclass_attribute_ml (
            contentclass_attribute_id INT NOT NULL,
            version INT NOT NULL,
            language_id BIGINT NOT NULL,
            name VARCHAR(255) NOT NULL,
            description TEXT,
            data_text TEXT,
            data_json TEXT, -- since MySQL 5.7 it will be JSON,
            PRIMARY KEY (contentclass_attribute_id, version, language_id),
            CONSTRAINT ezcontentclass_attribute_ml_attr_fk FOREIGN KEY (contentclass_attribute_id) REFERENCES ezcontentclass_attribute (id) ON DELETE CASCADE ON UPDATE CASCADE,
            CONSTRAINT ezcontentclass_attribute_ml_lang_fk FOREIGN KEY (language_id) REFERENCES ezcontent_language (id) ON DELETE CASCADE ON UPDATE CASCADE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
        

      • For PostgreSQL:

        CREATE TABLE ezcontentclass_attribute_ml (
            contentclass_attribute_id INT NOT NULL,
            version INT NOT NULL,
            language_id BIGINT NOT NULL,
            name VARCHAR(255) NOT NULL,
            description TEXT,
            data_text TEXT,
            data_json TEXT,
            PRIMARY KEY (contentclass_attribute_id, version, language_id),
            CONSTRAINT ezcontentclass_attribute_ml_lang_fk FOREIGN KEY (language_id) REFERENCES ezcontent_language (id) ON DELETE CASCADE ON UPDATE CASCADE
        );
        

      The change requires for MySQL upgrade script also and for PostgreSQL just an upgrade script (unless full PostgreSQL support will be ready before merging).

        Issue Links

          Activity

          Show
          Dawid Parafiński added a comment - https://github.com/ezsystems/repository-forms/pull/277 https://github.com/ezsystems/ezplatform-admin-ui/pull/824 https://github.com/ezsystems/ezpublish-kernel/pull/2532
          Show
          Katarzyna Zawada added a comment - PRs merged: https://github.com/ezsystems/ezpublish-kernel/commit/b0939bde0e49594241b4d32e515cc7317e18959b https://github.com/ezsystems/ezplatform-admin-ui/commit/80096c6ef40ff68dd883e1d426d29845567bf203 https://github.com/ezsystems/repository-forms/commit/05f857ea8fe7f0b312cac6104b0a2dc661898328
          Show
          Dominika Kurek added a comment - Covered in Doc PR: https://github.com/ezsystems/developer-documentation/pull/538

            People

            • Assignee:
              Unassigned
              Reporter:
              Andrzej Longosz
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile