alphagov/govuk_content_models — pull request #70 by alext (2013-05-03 10:54:36+00:00)
Title: Add unique index to Artefact slug field

This has a couple of benefits:

1. It will catch any uniqueness violations that validates_uniqueness_of
misses
2. Small performance benefit:

Times for requesting 5 different artefacts 10 times over in content_api on my dev VM:

```
Cold Warm1 Warm2 Warm3
No Index 3.743 3.697 3.613 3.582
Indiex 3.082 2.817 3.154 3.087
```

The cold column is with a freshly started instance of both mongo and content_api.