Sorry I didn't read your script in full. The references logic is in the wrong table; it should be in the users_management and driver_management and they should be referencing salary.user_id
As in my comments above, business logic would indicate that salary is not the correct table to be joining to as it has its own different Primary Key (id) along with a creation timestamp, and as salary will change over time you will likely get multiple records for a user in this table. You should have a table holding the employee/user data and join to this instead
Also you have data in the salary table that maybe should be held elsewhere: bank details should be part of the employee details, not salary details (security and modelling) so salary.user_id REFERENCES user(id)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sorry I didn't read your script in full. The references logic is in the wrong table; it should be in the users_management and driver_management and they should be referencing salary.user_id
As in my comments above, business logic would indicate that salary is not the correct table to be joining to as it has its own different Primary Key (id) along with a creation timestamp, and as salary will change over time you will likely get multiple records for a user in this table. You should have a table holding the employee/user data and join to this instead
Also you have data in the salary table that maybe should be held elsewhere: bank details should be part of the employee details, not salary details (security and modelling) so salary.user_id REFERENCES user(id)