From: Antony C. <an...@sm...> - 2006-11-23 12:38:49
|
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 |