Files
gitlabhq/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-06 17:40:26 +02:00
2016-06-15 14:59:37 +02:00
2016-05-31 19:33:46 -03: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-12 21:05:58 -04:00
2015-11-18 13:31:18 +01:00
2014-10-06 00:14:46 +02:00
2016-06-10 14:51:16 +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-05-20 15:58:36 -05:00
2016-06-15 14:59:37 +02:00
2016-04-28 21:28:39 +02:00
2015-09-08 20:23:01 -04:00
2014-10-31 17:22:16 -07:00
2016-05-26 13:58:01 +02: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-14 13:04:21 +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-05-23 09:11:21 +02:00
2016-03-10 12:37:14 +01:00
2013-06-06 10:10:51 +09:00
2016-06-15 14:59:37 +02:00