The current Admin schema in our project could benefit from several enhancements to improve data integrity, security, and performance. Here are proposed changes to make the schema more robust:
1) Add timestamps: Automatically include createdAt and updatedAt fields to track record creation and updates.
2) Add trim to String fields: Removes unnecessary whitespace from user inputs for name, facultyid, email, etc.
3) Set required fields: Enforce mandatory fields like name, email, facultyid, and password for data consistency.
4) Add unique constraints: Ensure that facultyid and email are unique to prevent duplicate entries. (4th is optional)
The current Admin schema in our project could benefit from several enhancements to improve data integrity, security, and performance. Here are proposed changes to make the schema more robust:
1) Add timestamps: Automatically include createdAt and updatedAt fields to track record creation and updates. 2) Add trim to String fields: Removes unnecessary whitespace from user inputs for name, facultyid, email, etc. 3) Set required fields: Enforce mandatory fields like name, email, facultyid, and password for data consistency. 4) Add unique constraints: Ensure that facultyid and email are unique to prevent duplicate entries. (4th is optional)