summaryrefslogtreecommitdiff
path: root/db/migrate/20180628124813_alter_web_hook_logs_indexes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add version 4.2 to all existing migrationsjprovazn-versioned-migrationsJan Provaznik2018-11-221-1/+1
| | | | | | | | | DB schema generated by a migration may look different in rails 4 and 5 (because rails 5 may use different default values). For this reason it's important to explicitly set for which rails version a migration was written for. See https://stackoverflow.com/questions/35929869/activerecordmigration-deprecation-warning-asks-for-rails-version-but-im-no/35930912#35930912
* Eliminate duplicated wordsTakuya Noguchi2018-11-221-1/+1
| | | | Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* Fixed pagination of web hook logsYorick Peterse2018-07-031-0/+28
For reasons unknown, the logs of a web hook were paginated in memory. This would result in the "Edit" page of a web hook timing out once it has more than a few thousand log entries. This commit makes the following changes: 1. We use LIMIT/OFFSET to paginate the data, instead of doing this in memory. 2. We limit the logs to the last two days, just like the documentation says (instead of retrieving everything). 3. We change the indexes on "web_hook_logs" so the query to get the data can perform a backwards index scan, without the need for a Filter. These changes combined ensure that Projects::HooksController#edit no longer times out.