Dependent Database Triggers & Functions
I have a database trigger that creates a user_shop for a user after a shop is created. Via the following trigger/function
Which all works fine and well.
I've decided that I want to create a shop for a user when a user record is created. However, I can not able to get that trigger/function to work as the prior one is already migrated into the database. I am trying
But I am getting an error saving the user and its due to the association of the user_shop to the user. How do I create a shop from an inserted user in the new function while allowing the existing function that creates the user_shop association row to still run? Any help is appreciated!
Which all works fine and well.
I've decided that I want to create a shop for a user when a user record is created. However, I can not able to get that trigger/function to work as the prior one is already migrated into the database. I am trying
But I am getting an error saving the user and its due to the association of the user_shop to the user. How do I create a shop from an inserted user in the new function while allowing the existing function that creates the user_shop association row to still run? Any help is appreciated!