Fresh pull of the recent 4.1.2 package and when config.yml is set to use with utf8mb4 -- @Michael Bessolov
doctrine:
dbal:
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
During the Database Setup/Process Migrations precedure I get the following errors. However, when installed without the above config.yml modifications, the install succeeds properly.. I have used utf8mb4 with 4.1.0 and 4.1.1 as well as the entire 3.1 branch with the current setup perfectly. Seems to just be introduced in the recent revision.
The initial error message is on MariaDB 10.4.12 and the second is after being tested against MySQL 5.7.29 after Andrey's mention of the error message formatting.
MariaDB 10.4.12-
> Oro\Bundle\DataAuditBundle\Migrations\Schema\OroDataAuditBundleInstaller
ERROR: An exception occurred while executing 'CREATE TABLE oro_audit (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, organization_id INT DEFAULT NULL, impersonation_id INT DEFAULT NULL, action VARCHAR(8) DEFAULT NULL, logged_at DATETIME DEFAULT NULL COMMENT '(DC2Type:datetime)', object_id VARCHAR(255) DEFAULT NULL, object_class VARCHAR(255) NOT NULL, object_name VARCHAR(255) DEFAULT NULL, version INT DEFAULT NULL, type VARCHAR(255) NOT NULL, transaction_id VARCHAR(255) NOT NULL, owner_description VARCHAR(255) DEFAULT NULL, additional_fields LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)', INDEX IDX_5FBA427CA76ED395 (user_id), INDEX idx_oro_audit_type (type), UNIQUE INDEX idx_oro_audit_version (object_id, object_class, version, type), UNIQUE INDEX idx_oro_audit_transaction (object_id, object_class, transaction_id, type), INDEX idx_oro_audit_logged_at (logged_at), INDEX idx_oro_audit_object_class (object_class), INDEX idx_oro_audit_obj_by_type (object_id, object_class, type), INDEX idx_oro_audit_owner_descr (owner_description), INDEX idx_oro_audit_organization_id (organization_id), INDEX IDX_5FBA427C26F87DB8 (impersonation_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes
@Andrey Yatsenko
MySQL 5.7.29 - edit: was missing english translation, shows same error now
> Oro\Bundle\DataAuditBundle\Migrations\Schema\OroDataAuditBundleInstaller
ERROR: An exception occurred while executing 'CREATE TABLE oro_audit (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, organization_id INT DEFAULT NULL, impersonation_id INT DEFAULT NULL, action VARCHAR(8) DEFAULT NULL, logged_at DATETIME DEFAULT NULL COMMENT '(DC2Type:datetime)', object_id VARCHAR(255) DEFAULT NULL, object_class VARCHAR(255) NOT NULL, object_name VARCHAR(255) DEFAULT NULL, version INT DEFAULT NULL, type VARCHAR(255) NOT NULL, transaction_id VARCHAR(255) NOT NULL, owner_description VARCHAR(255) DEFAULT NULL, additional_fields LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)', INDEX IDX_5FBA427CA76ED395 (user_id), INDEX idx_oro_audit_type (type), UNIQUE INDEX idx_oro_audit_version (object_id, object_class, version, type), UNIQUE INDEX idx_oro_audit_transaction (object_id, object_class, transaction_id, type), INDEX idx_oro_audit_logged_at (logged_at), INDEX idx_oro_audit_object_class (object_class), INDEX idx_oro_audit_obj_by_type (object_id, object_class, type), INDEX idx_oro_audit_owner_descr (owner_description), INDEX idx_oro_audit_organization_id (organization_id), INDEX IDX_5FBA427C26F87DB8 (impersonation_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes