Problems Installation with AwoCoupon PRO-2.5.9


  • Default avatar
    grupodw    
     6 years ago
    0

    Hi!!!!


    We are having problems when installing the latest version of AwoCoupon.

    The installation of the component throws us an installation error with this message:

    Specified key was too long; max key length is 767 bytes SQL=CREATE TABLE IF NOT EXISTS #__awocoupon_config ( `id` int(16) NOT NULL auto_increment, `name` VARCHAR(255) NOT NULL, `is_json` TINYINT(1), `value` TEXT, PRIMARY KEY (`id`), UNIQUE (`name`) );

    What do we do?


    Regards!!!!

  • Your avatar
    seyi    
     6 years ago
    0

    Hello,

    Without knowing more about the db, its hard to tell why this is an issue.  Just googling that error I found this:
    https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes

    So my guess is the default charset is something like utf8mb4, which would trigger the error.

    So altering the above query so that the charset is specifically set:
    CREATE TABLE IF NOT EXISTS #__awocoupon_config (
        `id` INT UNSIGNED NOT NULL auto_increment,
        `name` VARCHAR(255) CHARACTER SET utf8 NOT NULL,
        `is_json` TINYINT,
        `value` TEXT,
        PRIMARY KEY  (`id`),
        UNIQUE (`name`)
    );


    Would fix the error.