manishkatyan / strapi-stripe

Stripe Plugin for Strapi CMS
67 stars 33 forks source link

ER_TOO_LONG_IDENT with mysql #55

Closed miloctav closed 1 year ago

miloctav commented 1 year ago

Hello,

I'm trying to use strapi-stripe but I'm facing a mysql error at initialization :

[2022-11-17 15:56:47.083] debug: ⛔️ Server wasn't able to start properly.
[2022-11-17 15:56:47.086] error: alter table `strapi_stripe_strapi_stripe_payment_stripe_product_links` add index `strapi_stripe_strapi_stripe_payment_stripe_product_links_order_inv_fk`(`strapi_stripe_payment_order`) - ER_TOO_LONG_IDENT: Le nom de l'identificateur 'strapi_stripe_strapi_stripe_payment_stripe_product_links_order_inv_fk' est trop long
Error: ER_TOO_LONG_IDENT: Le nom de l'identificateur 'strapi_stripe_strapi_stripe_payment_stripe_product_links_order_inv_fk' est trop long
    at Query.Sequence._packetToError (C:\Dev\bestmum\strapi\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
    at Query.ErrorPacket (C:\Dev\bestmum\strapi\node_modules\mysql\lib\protocol\sequences\Query.js:79:18)
    at Protocol._parsePacket (C:\Dev\bestmum\strapi\node_modules\mysql\lib\protocol\Protocol.js:291:23)
    at Parser._parsePacket (C:\Dev\bestmum\strapi\node_modules\mysql\lib\protocol\Parser.js:433:10)
    at Parser.write (C:\Dev\bestmum\strapi\node_modules\mysql\lib\protocol\Parser.js:43:10)
    at Protocol.write (C:\Dev\bestmum\strapi\node_modules\mysql\lib\protocol\Protocol.js:38:16)
    at Socket.<anonymous> (C:\Dev\bestmum\strapi\node_modules\mysql\lib\Connection.js:88:28)
    at Socket.<anonymous> (C:\Dev\bestmum\strapi\node_modules\mysql\lib\Connection.js:526:10)
    at Socket.emit (events.js:400:28)
    at Socket.emit (domain.js:475:12)
    --------------------
    at Protocol._enqueue (C:\Dev\bestmum\strapi\node_modules\mysql\lib\protocol\Protocol.js:144:48)
    at Connection.query (C:\Dev\bestmum\strapi\node_modules\mysql\lib\Connection.js:198:25)
    at C:\Dev\bestmum\strapi\node_modules\knex\lib\dialects\mysql\index.js:132:18
    at new Promise (<anonymous>)
    at Client_MySQL._query (C:\Dev\bestmum\strapi\node_modules\knex\lib\dialects\mysql\index.js:126:12)
    at executeQuery (C:\Dev\bestmum\strapi\node_modules\knex\lib\execution\internal\query-executioner.js:37:17)
    at Client_MySQL.query (C:\Dev\bestmum\strapi\node_modules\knex\lib\client.js:146:12)
    at C:\Dev\bestmum\strapi\node_modules\knex\lib\execution\transaction.js:363:24
    at new Promise (<anonymous>)
    at Client_MySQL.trxClient.query (C:\Dev\bestmum\strapi\node_modules\knex\lib\execution\transaction.js:358:12)

The table name and consequently the foreign key name length is huge so mysql refuse it.

Can you check it please ?

amirkheirabadi73 commented 1 year ago

Same problem here ...

cantkillemall commented 1 year ago

same here  😢

MathieuRegis commented 1 year ago

Same here, can't do anything since the length of the identifier can't be increased in mysql (64 characters max). If you need a way to reproduce, init a strapi project with mysql and install stripe plugin

error: alter table `strapi_stripe_strapi_stripe_payment_stripe_product_links` add index `strapi_stripe_strapi_stripe_payment_stripe_product_links_order_inv_fk`(`strapi_stripe_payment_order`) - ER_TOO_LONG_IDENT: Identifier name 'strapi_stripe_strapi_stripe_payment_stripe_product_links_order_inv_fk' is too long
Error: ER_TOO_LONG_IDENT: Identifier name 'strapi_stripe_strapi_stripe_payment_stripe_product_links_order_inv_fk' is too long
nishekh-e-r commented 1 year ago

Hi all, we are working on it and will keep updated ASAP.

nishekh-e-r commented 1 year ago

Hi @all, we have fixed the reported issues. please install an updated version of strapi-stripe, also please refer to the database table name here