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

General error: 1005 Can't create table 'DB.#sql-1d80_ab023c' in database migration #10

Open
BERRAMOU opened this issue Oct 12, 2020 · 3 comments

Comments

@BERRAMOU
Copy link

When i run the command php bin/command.php phinx:migrate i get the following error:

PDOException: SQLSTATE[HY000]: General error: 1005 Can't create table 'DB_NAME.#sql-1d80_ab023c' (errno: 150) in /PATH/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:184
Stack trace:
#0 /PATH/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(184): PDO->exec('ALTER TABLE `su...')
#1 /PATH/vendor/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php(112): Phinx\Db\Adapter\PdoAdapter->execute('ALTER TABLE `su...')
@rootpd
Copy link
Member

rootpd commented Oct 15, 2020

Hi there. Could you please specify:

  • What database and which version you're using? Or are you using Docker Compose we provided?
  • Is this the full output of the migrate command? It doesn't look like the very first DB migration, I'd expect some more output being printed before. It would help us pinpoint specific database change being applied.

Thanks.

@BERRAMOU
Copy link
Author

Hello @rootpd ,
Thanks for your quick reply, i have found the issue it was MariaDB version, i had mariaDB version 5.5.64, now i upgrade it to 10.3.25 and it works perfectly.
It would be great if you could add minimum requirements to README.
Thanks again!

@rootpd
Copy link
Member

rootpd commented Oct 15, 2020

Great to hear you've found the way around. Yeah, we'll add that, it actually should be safe to use MySQL 5.7+ (or any forked variant, such as MariaDB 10.1+, Percona 5.7+, etc.). Keeping this open until we update the README.

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

2 participants