![]() ![]() When deleting a record from table a, I want to set the del flag at the current time and cascase the corresponding flag in table b ( but not delete records from database actually). 4 Answers Sorted by: 124 A foreign key with a cascade delete means that if a record in the parent table is deleted, then the corresponding records in the child table will automatically be deleted. PostgreSQL engine for Django that supports ON DELETE CASCADE at the database level. I have following database structure: table a (Ī_id bigint references a(id) on delete cascade, Using the DELETE CASCADE option in your foreign key constraint definitions means better performance and less code when removing records from tables that. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |