Title: Problem while migrating site
Last modified: May 16, 2019

---

# Problem while migrating site

 *  Resolved [De Belser Arne](https://wordpress.org/support/users/arnedb/)
 * (@arnedb)
 * [7 years ago](https://wordpress.org/support/topic/problem-while-migrating-site/)
 * Hello there,
 * When trying to migrate a website I came across the following error which caused
   the migration to fail:
 * error while creating the table wp_aelia_exchange_rates_history. The key was too
   long. MAX key length is 767 bytes
 * I came to think that this is something caused by this plugin, do you have any
   idea how I can update the database schema to allow for more key length?
 * Kind Regards

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Diego](https://wordpress.org/support/users/daigo75/)
 * (@daigo75)
 * [7 years ago](https://wordpress.org/support/topic/problem-while-migrating-site/#post-11540095)
 * That message could be due to the fact that the MySQL database uses the `utf8mb4`
   encoding, which needs 4 bytes per character. The key for table `aelia_exchange_rates_history`
   uses field `provider_name`, which is 200 characters long. The `utf8mb4` encoding
   would need 800 bytes, which are too many.
 * To check if this is correct, you can try the following:
    1. Open file `woocommerce-
   eu-vat-assistant/src/lib/classes/install/aelia-wc-eu-vat-assistant-install.php`.
   2. At line ~152, change `provider_name varchar(200) NOT NULL` to `provider_name
   varchar(180) NOT NULL. 3. Save the file. 4. Try to repeat the installation.
 * If my hypothesis is correct, the installation should now succeed. In that case,
   I will ask to release a patch to reduce the size of the column. After all, 180
   characters for the name of an exchange rates provider should more than enough.
 *  Plugin Author [Diego](https://wordpress.org/support/users/daigo75/)
 * (@daigo75)
 * [7 years ago](https://wordpress.org/support/topic/problem-while-migrating-site/#post-11546659)
 * [@arnedb](https://wordpress.org/support/users/arnedb/) I can confirm that the
   issue was due to the size of the `provider_name` column. In MySQL 5.6 and earlier,
   using the InnoDB engine, an index can have a maximum size of 767 bytes. A column
   of 200 characters, using 4 bytes per character, would use 800 bytes, and it would
   be too large. This issue doesn’t occur in MySQL 5.7 and alternative databases(
   MariaDB, Percona), as they can handle a larger index.
 * We have reduced the size of the `provider_name` column in EU VAT Assistant 1.9.12.190516.
   That should be sufficient to solve the issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem while migrating site’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-eu-vat-assistant/assets/icon.svg?rev=1057426)
 * [EU VAT Assistant for WooCommerce](https://wordpress.org/plugins/woocommerce-eu-vat-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-eu-vat-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-eu-vat-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-eu-vat-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-eu-vat-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-eu-vat-assistant/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Diego](https://wordpress.org/support/users/daigo75/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/problem-while-migrating-site/#post-11546659)
 * Status: resolved