yetzt/triggy — pull request #6 by ckintner (2012-06-15 23:34:06+00:00)
Title: Add trigger descriptions

# Description
This request adds an action and a warning field to the link-creation form. The action field contains predefined actions (such as `describes`) but the warning field is a free text field.

# Problems
I'm not happy with this but there's no way one could ever create a comprehensive list of trigger categories. I will add some hints in a help/FAQ page to give suggestions which things could need trigger warnings (perhaps linked after the warning form with a question mark).

# Changes
**This request changes the database scheme**:
All `triggy:resolv:link:#link`-strings are now hashes containing four fields: `url, action, warning, created_at` (this is an optional step, but I preferred it over something like `triggy:warning:link:#link`-keys). All `triggy:resolv:hash:#hash`-strings are now sets containing short URL-#links (this is required, because with warnings there can be more than one short URL to one long URL).

I added a little python migration script which applies the necessary changes to the database. I made a test with 1,25m links (~2,5m keys) and everything went fine. **But please make sure to have a database dump** ready if you accept this request and migrate the database.