Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to generate the database #2

Open
raaaahman opened this issue Apr 30, 2020 · 1 comment · May be fixed by #3
Open

Error when trying to generate the database #2

raaaahman opened this issue Apr 30, 2020 · 1 comment · May be fixed by #3

Comments

@raaaahman
Copy link

I had the following error during the build process:

Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table

Illuminate\Database\QueryException

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email))

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
> 671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|

  +11 vendor frames 

12 database/migrations/2014_10_12_000000_create_users_table.php:24
Illuminate\Support\Facades\Facade::__callStatic("create")

  +22 vendor frames 

35 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Steps to reproduce

  • Install dependencies from composer
  • Install dependencies from npm
  • Create .env file
  • Generate key with PHP Artisan
  • Migrate with PHP Artisan
SekmSet added a commit that referenced this issue May 1, 2020
Fix #2
@SekmSet SekmSet linked a pull request May 1, 2020 that will close this issue
@SekmSet
Copy link
Owner

SekmSet commented May 1, 2020

Thank you for your feedback,

I created a PR, can you try it ?
#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants