Files
gitlabhq/lib/gitlab
Robert Speicher 8dccfb4a9c 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 16:36:22 +00:00
..
2016-06-06 17:40:26 +02:00
2016-06-17 11:52:22 +02:00
2015-11-30 18:36:34 +02:00
2015-12-15 00:53:52 -02:00
2014-09-29 12:05:17 +03:00
2016-06-16 10:59:36 +02:00
2016-06-12 21:05:58 -04:00
2015-11-18 13:31:18 +01:00
2014-10-06 00:14:46 +02:00
2016-06-01 12:10:08 +02:00
2015-02-24 15:07:24 +01:00
2016-04-13 13:12:05 +03:00
2014-10-06 00:14:46 +02:00
2016-04-28 21:28:39 +02:00
2016-06-16 09:01:09 +02:00
2014-10-31 17:22:16 -07:00
2014-10-06 00:14:46 +02:00
2015-03-24 18:35:57 -07:00
2014-10-06 00:14:46 +02:00
2016-06-03 10:37:09 -06:00
2014-10-06 00:14:46 +02:00
2015-08-26 11:30:38 -07:00
2016-03-10 12:37:14 +01:00
2013-06-06 10:10:51 +09:00