title: SQL Error #1071 - Specified key was too long; max key length is 767 bytes
body: <pre><code>CREATE TABLE wp_locations (
          `id` INT(11) NOT NULL AUTO_INCREMENT,
          `city` VARCHAR(255) NOT NULL,
          `name` VARCHAR(255) NOT NULL,
          CONSTRAINT `city_name` UNIQUE (`city`, `name`)
      ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  </code></pre>
  
  <p>I got an sql error '#1071 - Specified key was too long; max key length is 767 bytes'</p>
  
  <p>What am I doing wrong?</p>