disable cascade delete April 23, 2020, 02:06:55 AM Hello everyone, I have a question that I cannot solve and that is to avoid cascade deletion. I have 2 tables related by their id which are the customer table and the invoices table. I would like to delete 1 customer not delete the invoices. Does anyone know how it can be disabled?Greetings and thank you. Quote Selected
Re: disable cascade delete Reply #1 – April 23, 2020, 05:30:14 AM HiI Think you can add foreign key to children table or at new version of PHPrad which have soft deleted that maybe avoid deleting databaseHope is helpThinh Quote Selected
Re: disable cascade delete Reply #2 – April 23, 2020, 09:41:08 AM Thanks for your answer. I think I remember reading something you are talking about, but I really don't know how it works. See if someone who has had the opportunity to use this option answers and can explain a bit how to do it. Thank you Quote Selected
Re: disable cascade delete Reply #3 – April 23, 2020, 12:16:53 PM Hi thereAs I mention have two way to avoiding of deleting invoice if you delete customer first1. PHPrad have no SQL constraint when create DB, you can go to mysql and using add Foreign key to the Child Table. in this way when you delete customer have invoice relationship --> error showing up.2. you can add colum to customer like 'is_deleted' to remove customer showing but not real delete, phprad new version support that.I also tried to find and remove cascase delete but not workThinh Quote Selected