I am working on a project in Django Rest Framework. The Project is mostly completed, but suddenly new requirement come from the client.
Their requirement is that the Worker should also be able to Signup as a Customer, and the Customer should also be able to signup as a Worker. They are located in different apps.
The problem is that my database scheme is implemented in a different way and I don't have a seperate table for the worker. Now I'm stuck on what should I do, Here is my database structure:
Class User(AbstractUser):
username
email unique=True
first_name
last_name
...
Class Worker(User):
weight
job_category
Suppose that the Worker email is "dudeworker@gmail.com", and they want to signup as a Customer with the same email (dudeworker@gmail.com); they will get an error, as expected, saying Email is Already exist. Now if I seperate the Worker table, then I have to perform lots of changes in the code.
What is the best solution for this situation? By overriding the email field in Worker table, giving the error.