SIMS API - Ensure duplicate files are not persisted
- Dominant language
- TypeScript
- Stars
- 29
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
While uploading files, ensure there will be checks to avoid the same file (unique file name) persisting twice in the DB.
- [ ] Add validation to the API endpoint `POST student/files` to ensure a file with the same unique name is not already persisted.
- [ ] Crate a unique constraint on column `sims.student_files.unique_file_name`.
- [ ] Prior to DB migration execution, ensure there are no duplicated "unique file names" already on DB.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the POST student/files API endpoint and inspect sims.student_files.unique_file_name, checking existing records for duplicates before planning the migration. Done means duplicate uploads are rejected, existing duplicate names are addressed, and the database enforces uniqueness on the column.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100