Files
gitlabhq/spec/lib/gitlab
Robert SpeicherandRobert Speicher 432347426c Merge branch 'update-column-in-batches-where' into 'master'
Allow customising of queries used for `update_column_in_batches`

This MR makes two changes to `add_column_with_default` and `update_column_in_batches`:

1. `add_column_with_default` no longer wraps the entire set of updates in a single transaction, preventing any locks from sticking around for the duration of the entire transaction
2. `update_column_in_batches` now takes a block which can be used to customise the queries. This uses Arel as messing with raw SQL strings is a total pain

In !4381 there's a need for updating existing rows/columns in a table in batches using a custom `WHERE` condition. Without the changes in this MR this would not be possible.

See merge request !4680
2016-06-17 14:14:25 -04:00
..
2016-06-07 10:25:57 +02:00
2016-03-31 09:22:28 +02:00
2015-12-09 11:55:42 +01:00
2015-12-09 11:55:42 +01:00
2016-06-13 15:38:25 +02:00
2015-12-09 11:55:42 +01:00
2015-12-09 11:55:42 +01:00
2015-12-09 11:55:42 +01:00
2016-05-20 15:58:36 -05:00
2016-01-19 16:26:44 +01:00
2015-12-09 11:55:42 +01:00
2016-05-26 13:58:01 +02:00
2015-12-09 11:55:42 +01:00
2016-05-29 15:03:00 -04:00
2015-12-09 11:55:42 +01:00
2016-02-01 16:20:49 +01:00
2015-12-09 11:55:42 +01:00
2015-12-09 11:55:42 +01:00
2015-12-09 11:55:42 +01:00
2015-12-09 11:55:42 +01:00