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

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

Open
ghostmigi opened this issue Nov 25, 2022 · 11 comments

Comments

@ghostmigi
Copy link

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
Copy link

There is definitely a unique key

@yungifez
Copy link

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

@ghostmigi
Copy link
Author

ghostmigi commented Nov 25, 2022 via email

@ghostmigi
Copy link
Author

ghostmigi commented Nov 25, 2022 via email

@yungifez
Copy link

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
Copy link
Author

ghostmigi commented Nov 25, 2022 via email

@yungifez
Copy link

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
Copy link
Author

ghostmigi commented Nov 25, 2022 via email

@ghostmigi
Copy link
Author

ghostmigi commented Nov 25, 2022 via email

@yungifez
Copy link

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

@ghostmigi
Copy link
Author

ghostmigi commented Nov 25, 2022 via email

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