mysql: assign opportunities to user based on parent account

Query to Select List:   SELECT * FROM opportunities LEFT JOIN accounts_opportunities ON accounts_opportunities.opportunity_id = opportunities.id LEFT JOIN accounts ON accounts_opportunities.account_id = accounts.id WHERE accounts.assigned_user_id = ‘7077c616-4f2c-f966-d9b6-5581807bae86’;     UPDATE Query: UPDATE opportunities x LEFT JOIN accounts_opportunities y ON y.opportunity_id […]

pgsql: cannot delete line on table.

This happens when I try to manually delete a record on the Database   ERROR: update or delete on table “m_inoutline” violates foreign key constraint “m_inoutline_canceled_inoutline” on table “m_inoutline” DETAIL: Key (m_inoutline_id)=(8310BD9D63A94DB5A2294EC8E48C6C9F) is still referenced from table “m_inoutline”. ********** Error […]