WP: tmpfiles table invalid in some dbs

Description

The tmpfiles table that was introduced recently is invalid in Mariadb 10.1.14 (and perhaps in other setups as well).
The "path" field is used as a primary key, but it is too large, resulting in a db error:
WordPress database error: [Index column size too large. The maximum column size is 767 bytes.]
CREATE TABLE wp_h5p_tmpfiles ( path VARCHAR(255) NOT NULL, created_at INT UNSIGNED NOT NULL, PRIMARY KEY (path), KEY created_at (created_at) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

See https://github.com/h5p/h5p-wordpress-plugin/commit/f1da08a1816cdf8428647b8dc174bd27789ee94e for comments

Acceptance Criteria

  • Database definition for tmpfiles must be valid for all wordpress supported databases.

Status

Assignee

Unassigned

Reporter

Thomas Marstrander

Labels

Funding

None

Code reviewer

None

Released

None

Priority

High
Configure