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

Key too long #18

Open
entropylaw opened this issue Jun 11, 2019 · 0 comments
Open

Key too long #18

entropylaw opened this issue Jun 11, 2019 · 0 comments

Comments

@entropylaw
Copy link

root@esiknife:/var/www/esiknife# php artisan migrate --step -v
Migration table created successfully.

   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 `jobs` add index `jobs_queue_index`(`queue`))

  at /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
    660|         // If an exception occurs when attempting to run a query, we'll format the error
    661|         // message to include the bindings with SQL, which will make this exception a
    662|         // lot more helpful to the developer instead of just the database's errors.
    663|         catch (Exception $e) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }
    668|

  Exception trace:

  1   Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes")
      /var/www/esiknife/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:143

  2   PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes")
      /var/www/esiknife/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:141

  3   PDOStatement::execute()
      /var/www/esiknife/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:141

  4   Doctrine\DBAL\Driver\PDOStatement::execute()
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458

  5   Illuminate\Database\Connection::Illuminate\Database\{closure}("alter table `jobs` add index `jobs_queue_index`(`queue`)", [])
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657

  6   Illuminate\Database\Connection::runQueryCallback("alter table `jobs` add index `jobs_queue_index`(`queue`)", [], Object(Closure))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624

  7   Illuminate\Database\Connection::run("alter table `jobs` add index `jobs_queue_index`(`queue`)", [], Object(Closure))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Connection.php:459

  8   Illuminate\Database\Connection::statement("alter table `jobs` add index `jobs_queue_index`(`queue`)")
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php:88

  9   Illuminate\Database\Schema\Blueprint::build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:252

  10  Illuminate\Database\Schema\Builder::build(Object(Illuminate\Database\Schema\Blueprint))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:165

  11  Illuminate\Database\Schema\Builder::create("jobs", Object(Closure))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:221

  12  Illuminate\Support\Facades\Facade::__callStatic("create")
      /var/www/esiknife/database/migrations/2018_04_19_221608_create_jobs_table.php:24

  13  CreateJobsTable::up()
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:359

  14  Illuminate\Database\Migrations\Migrator::Illuminate\Database\Migrations\{closure}()
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:366

  15  Illuminate\Database\Migrations\Migrator::runMigration(Object(CreateJobsTable), "up")
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:177

  16  Illuminate\Database\Migrations\Migrator::runUp("/var/www/esiknife/database/migrations/2018_04_19_221608_create_jobs_table.php")
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:146

  17  Illuminate\Database\Migrations\Migrator::runPending([])
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:95

  18  Illuminate\Database\Migrations\Migrator::run([])
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:70

  19  Illuminate\Database\Console\Migrations\MigrateCommand::handle()
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29

  20  call_user_func_array([])
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29

  21  Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87

  22  Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31

  23  Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), [])
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Container/Container.php:564

  24  Illuminate\Container\Container::call()
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Console/Command.php:183

  25  Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
      /var/www/esiknife/vendor/symfony/console/Command/Command.php:252

  26  Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Console/Command.php:170

  27  Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      /var/www/esiknife/vendor/symfony/console/Application.php:865

  28  Symfony\Component\Console\Application::doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      /var/www/esiknife/vendor/symfony/console/Application.php:241

  29  Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      /var/www/esiknife/vendor/symfony/console/Application.php:143

  30  Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Console/Application.php:88

  31  Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      /var/www/esiknife/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122

  32  Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      /var/www/esiknife/artisan:37

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

No branches or pull requests

1 participant