I have some book keeping tasks (reset high water marks, clear some staged data) that need to be done after each restore of a QA database. I know that I can create triggers on databases in SQL but I do not seem to be able to find a way to do it on a database restore.
Since I work on a team of people with shared ownership of the database, I cannot always know when a restore occurs. Is there a way to automate this either with a trigger or some other database magic so that the cleanup procedure will always be called?