area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.78k stars 575 forks source link

error PDOException on php artisan twill:setup #33

Closed khyoz closed 6 years ago

khyoz commented 6 years ago

(Windows10 / Mamp Pro 4 / php 7.1.7)

1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1059 Identifier name 'fk_your_plural_module_name_translations_your_plural_module_name_id' is too long") D:\MAMP\htdocs\twill\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458

2 PDOStatement::execute() D:\MAMP\htdocs\twill\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458

noxify commented 6 years ago

Hi @khyoz,

@ifox - I can reproduce the error in my vagrant box, but this issue occurs based on the limitation in mysql.

Possible workaround/solution is to define other key names: https://laraveldaily.com/migration-index-too-long-choose-the-name-yourself/

ifox commented 6 years ago

Hi @khyoz,

Like @noxify correctly identified, it seems like you created a new CRUD module without choosing a name for it.

In our docs, yourPluralModuleName is not a proper example, but rather an indication that you should use the plural form of your Laravel model in the artisan command parameter.

So actual examples would be php artisan twill:module articles or php artisan twill:module events.

khyoz commented 6 years ago

ok thanks, you were right, I used yourPluralModuleName. I will retry following your advices.