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 on migrate #17

Open
butirpadi opened this issue Mar 21, 2018 · 1 comment
Open

Error on migrate #17

butirpadi opened this issue Mar 21, 2018 · 1 comment

Comments

@butirpadi
Copy link

I get this error on migrate, I use xampp version 7.2.2 with specs:

  • PHP to 7.2.1
  • MariaDB to 10.1.30
  • phpMyAdmin 4.7.7

[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1005 Can't create table isave_db.#sql-2fbe_b (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table employee_salary add constraint employee_salary_employee_id_foreign foreign key (employee_id) references employee (id))

@adibayusantika
Copy link

Add 's'

change:
$table->foreign('employee_id')->references('id')->on('employee');

to:
$table->foreign('employee_id')->references('id')->on('employees');

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