4jean / lav_sms

Laravel School Management System (LAVSMS)
MIT License
769 stars 475 forks source link

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-2022-2023' for key 'exams_term_year_unique' #57

Open ghostmigi opened 1 year ago

ghostmigi commented 1 year ago

Hello sir, can sameone help me please .

i need to create exam i add exam with name and term, first try accepte the exam and when i want to add another exam they show me this issue

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-2022-2023' for key 'exams_term_year_unique' (SQL: insert into exams (name, term, year, updated_at, created_at) values (sport, 1, 2022-2023, 2022-11-25 10:22:52, 2022-11-25 10:22:52))

how can i solve this ? im going to migration and i see nothing is unique on table , i think i should increment the id

Thank you sir

yungifez commented 1 year ago

There is definitely a unique key

yungifez commented 1 year ago

From what I can see you can only add one exam with same term and year

ghostmigi commented 1 year ago

Hello thanks for your reply

I try to install application and seed db, and i go to exam , i create first exam is ok and i create second and third, but when i want to create another first exam i see this erreur

On Fri, Nov 25, 2022, 1:18 PM Ebuka Ifezue @.***> wrote:

From what I can see you can only add one exam with same term and year

— Reply to this email directly, view it on GitHub https://github.com/4jean/lav_sms/issues/57#issuecomment-1327405255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH45KULPZK7N4VI4IHQB66LWKCVA3ANCNFSM6AAAAAASLFVVII . You are receiving this because you authored the thread.Message ID: @.***>

ghostmigi commented 1 year ago

So you can explain me how it work sir , thank you for your time

On Fri, Nov 25, 2022, 1:22 PM Karim Saber @.***> wrote:

Hello thanks for your reply

I try to install application and seed db, and i go to exam , i create first exam is ok and i create second and third, but when i want to create another first exam i see this erreur

On Fri, Nov 25, 2022, 1:18 PM Ebuka Ifezue @.***> wrote:

From what I can see you can only add one exam with same term and year

— Reply to this email directly, view it on GitHub https://github.com/4jean/lav_sms/issues/57#issuecomment-1327405255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH45KULPZK7N4VI4IHQB66LWKCVA3ANCNFSM6AAAAAASLFVVII . You are receiving this because you authored the thread.Message ID: @.***>

yungifez commented 1 year ago

I think this means that 2 exams cannot have the same name. I'm not sure as I'm not running the project anywhere and judging based on what you told me

The code itself says that somehow you cannot have more than 1 exam in the same term and year

@4jean should be able to clear this

ghostmigi commented 1 year ago

I see but i want to create many exams it possible or this part accepte only 3 For example i want to create exam english maths phylo and frensh, or this is not the place i think to add this

On Fri, Nov 25, 2022, 1:31 PM Ebuka Ifezue @.***> wrote:

I think this means that 2 exams cannot have the same name. I'm not sure as I'm not running the project anywhere and judging based on what you told me

The code itself says that somehow you cannot have more than 1 exam in the same term and year

@4jean https://github.com/4jean should be able to clear this

— Reply to this email directly, view it on GitHub https://github.com/4jean/lav_sms/issues/57#issuecomment-1327418421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH45KUKOJDIMHK6QIA2VGMLWKCWTVANCNFSM6AAAAAASLFVVII . You are receiving this because you authored the thread.Message ID: @.***>

yungifez commented 1 year ago

I don't think Exams work that way

You should create an exam like first semester final exams etc then you can add grades for each subjects in the system

ghostmigi commented 1 year ago

Aaaah i see hhh sorry bro, because here in Morocco not the same concept , i understand now, thank you so much

On Fri, Nov 25, 2022, 2:05 PM Ebuka Ifezue @.***> wrote:

I don't think Exams work that way

You should create an exam like first semester final exams etc then you can add grades for each subjects in the system

— Reply to this email directly, view it on GitHub https://github.com/4jean/lav_sms/issues/57#issuecomment-1327451229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH45KUOIPVSCEH4TEXRO4JLWKC2THANCNFSM6AAAAAASLFVVII . You are receiving this because you authored the thread.Message ID: @.***>

ghostmigi commented 1 year ago

Also i find an error in graduat student when you find a promotion student and you make him graduate you go to graduate section and you find it, but the error when you want to edit the graduate student from graduation section there is and erreur also when you want to see the profile from graduat section.

On Fri, Nov 25, 2022, 2:17 PM Karim Saber @.***> wrote:

Aaaah i see hhh sorry bro, because here in Morocco not the same concept , i understand now, thank you so much

On Fri, Nov 25, 2022, 2:05 PM Ebuka Ifezue @.***> wrote:

I don't think Exams work that way

You should create an exam like first semester final exams etc then you can add grades for each subjects in the system

— Reply to this email directly, view it on GitHub https://github.com/4jean/lav_sms/issues/57#issuecomment-1327451229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH45KUOIPVSCEH4TEXRO4JLWKC2THANCNFSM6AAAAAASLFVVII . You are receiving this because you authored the thread.Message ID: @.***>

yungifez commented 1 year ago

I think you should create a different issue for that wirh screenshots

ghostmigi commented 1 year ago

ok alright brother

On Fri, Nov 25, 2022 at 3:52 PM Ebuka Ifezue @.***> wrote:

I think you should create a different issue for that wirh screenshots

— Reply to this email directly, view it on GitHub https://github.com/4jean/lav_sms/issues/57#issuecomment-1327599358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH45KUJG63HKDUQPWQXRTW3WKDHEPANCNFSM6AAAAAASLFVVII . You are receiving this because you authored the thread.Message ID: @.***>

-- SABER Karim