Open Farzadr98 opened 8 months ago
Let me see the command you wanna use the create the table in the terminal??
On Mon, Feb 26, 2024, 8:07 PM Farzadr98 @.***> wrote:
Hey there! I'm getting this error after I run migrations in this project, can you help me ? Error message:
SQLSTATE[HY000]: General error: 1005 Can't create table school.users (errno: 150 "Foreign key constraint is incorrectly formed") (Connection: mysql, SQL: alter table users add constraint users_faculty_id_foreign foreign key (faculty_id) references faculties (id) on delete cascade)
— Reply to this email directly, view it on GitHub https://github.com/EliezerSunny/University-of-Abuja-School-Management-System-Laravel-Project/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKTOSDIJ3AVZJEAJCAHMQTYVTMPPAVCNFSM6AAAAABD2YAUWSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TIOJRGM3TOOA . You are receiving this because you are subscribed to this thread.Message ID: <EliezerSunny/University-of-Abuja-School-Management-System-Laravel-Project/issues/1 @github.com>
Let me see the command you wanna use the create the table in the terminal?? … On Mon, Feb 26, 2024, 8:07 PM Farzadr98 @.***> wrote: Hey there! I'm getting this error after I run migrations in this project, can you help me ? Error message: SQLSTATE[HY000]: General error: 1005 Can't create table school.users (errno: 150 "Foreign key constraint is incorrectly formed") (Connection: mysql, SQL: alter table users add constraint users_faculty_id_foreign foreign key (faculty_id) references faculties (id) on delete cascade) — Reply to this email directly, view it on GitHub <#1>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKTOSDIJ3AVZJEAJCAHMQTYVTMPPAVCNFSM6AAAAABD2YAUWSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TIOJRGM3TOOA . You are receiving this because you are subscribed to this thread.Message ID: <EliezerSunny/University-of-Abuja-School-Management-System-Laravel-Project/issues/1 @github.com>
I typed this in windows terminal: php artisan migrate
Hey there! I'm getting this error after I run migrations in this project, can you help me ? Error message:
SQLSTATE[HY000]: General error: 1005 Can't create table
school
.users
(errno: 150 "Foreign key constraint is incorrectly formed") (Connection: mysql, SQL: alter tableusers
add constraintusers_faculty_id_foreign
foreign key (faculty_id
) referencesfaculties
(id
) on delete cascade)