Upgraders consider adding new index to ahoy_events (#221)

Eliot Sykes committed Jan 13, 2017
commit b8f55394db393baf6ea40309a7f8fc17490e1e6e
Showing 2 changed files with 9 additions and 1 deletions
CHANGELOG.md +1 -0
@@ @@ -36,6 +36,7 @@
- Detect database for `rails g ahoy:stores:active_record` for easier installation
- Use `safely` as default exception handler
- Fixed issue with log silencer
+ - Use multi-column indexes on `ahoy_events` table creation
## 1.3.1
README.md +8 -1
@@ @@ -571,7 +571,14 @@ Ahoy.mount = false
### 1.4.0
- There’s nothing to do, but it’s worth noting the default store was changed from `ActiveRecordStore` to `ActiveRecordTokenStore` for new installations. `ActiveRecordStore` will continue to be supported.
+ There’s nothing mandatory to do, but it’s worth noting the default store was changed from `ActiveRecordStore` to `ActiveRecordTokenStore` for new installations. `ActiveRecordStore` will continue to be supported.
+
+ **Optional** Consider migrating `ahoy_events` table to have the following multi-column index as this *may* benefit
+ query performance depending on your usage:
+
+ ```ruby
+ add_index :ahoy_events, [:name, :time]
+ ```
### json -> jsonb