Commit Graph

2 Commits

Author SHA1 Message Date
Jan Provaznik 0fc9f9d3e7 Add version 4.2 to all existing migrations
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
2018-11-22 13:18:28 +01:00
Stan Hu 609a434c6d Adding missing indexes on taggings table
API requests were timing out because `tag_id` was missing an index. These
migrations were imported by running https://github.com/mbleigh/acts-as-taggable-on#post-installation:

```
bundle exec rake acts_as_taggable_on_engine:install:migrations
```

It looks like the `acts-as-tagglable` gem added the indexes in v4.0.0, but
when we upgraded from v3.5.0 (back in 2016 via
f571aeb5ce) we did not add them.

On staging, there are about 10.7 million rows on the `taggings` table. It took about 30 seconds for each index to be created.

On production, there are about 17.4 million rows, so I suspect the time to be about a minute per index.

Closes #43927
2018-03-07 21:39:20 -08:00