Revert "Removed most of the controller hooks except before_create"

This reverts commit ff4bc52ebbddfaa29c75c08672b03b5dcb33cf96.
Test multi-key uniqueness validations in database

Before this commit, testing that the compound key [name, email] was
unique would pass even if name and email were each globally unique.

[#54079455]
Remove the redundant tests for uniqueness at api level

[#54079455]
add rake task to rollback migrations
Prefix the event types

[#49165165]
Removed method only used for testing
Fix the build