From: Adam M. <ada...@ou...> - 2006-11-23 12:48:02
|
ON DELETE CASCADE doesn't work with MySQL and MS SQLServer, what would you do about those DB's? adam | -----Original Message----- | From: bod...@li... | [mailto:bod...@li...] On Behalf Of | Antony Corfield | Sent: 23 November 2006 12:39 | To: bod...@li... | Subject: [Bodington-developers] Deleting users | | Hi All, | | We've had a few problems with unwanted users (users with wrong username | or more than 1 username etc.) in the bodington DB but as you know | deleting users is a pain. This is because there are 18 tables that | reference the users table via foreign key constraint. So I've attached | an sql script (bodington v 2.8) that will alter these constraints to | allow ON DELETE CASCADE, then all you need to remove a user, given | their username, is the following: | | delete from users where user_id in (select user_id from pass_phrases | where user_name='username'); | | Some people might feel this is dangerous and object to living on the | edge but we on Skye encounter the severities of life on a daily basis, | especially those with an office next to Alistair! | | Any comments? | | Antony |