wvanbergen/adyen — Issue #39: notification_migration MySQL Error
Author: vitalis
Created: 2011-11-22 16:28:47+00:00
State: open

on add_index(:adyen_notifications, [:psp_reference, :event_code, :success], {:unique=>true, :name=>"adyen_notification_uniqueness"})

i'm getting the next error:

Mysql::Error: Specified key was too long; max key length is 1000 bytes: CREATE UNIQUE INDEX `adyen_notification_uniqueness` ON `adyen_notifications` (`psp_reference`, `event_code`, `success`)

my msql server variables for utf8 are:
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql-5.1.59-osx10.6-x86_64/share/charsets/ |
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci

as i see psp_reference and event_code are VARCHAR(255)
so (255+255)*3 = 1530 and it much more then 1000

Regards,
Vitalis