We need to ensure that a default profile is automatically created for users who are verified, either through pgAdmin or by verifying their email. This profile should persist even if the verification status is later revoked.
Tasks:
[ ] Implement a mechanism to create a default profile when a user is verified through either pgAdmin or the application.
[ ] Ensure that the default profile remains in the database even if the user's verification status is later withdrawn.
[ ] Implement a database trigger that runs only once when isVerified is set to true for the first time.
Suggested Implementation:
Create a database trigger that checks the isVerified status.
The trigger should only execute the first time isVerified is set to true, ensuring a default profile is created.
Ensure the profile remains in the database regardless of any future changes to the isVerified status.
We need to ensure that a default profile is automatically created for users who are verified, either through pgAdmin or by verifying their email. This profile should persist even if the verification status is later revoked.
Tasks:
Suggested Implementation:
Create a database trigger that checks the isVerified status.
The trigger should only execute the first time isVerified is set to true, ensuring a default profile is created.
Ensure the profile remains in the database regardless of any future changes to the isVerified status.