What a lot of pain and suffering. To protect against someone deleting things accidentally? How about a big warning message that says "Are you REALLY SURE you want to delete this package (50MB of data)?" and then we can all just use on delete cascade|set null?