From: Tom Clegg Date: Mon, 22 Apr 2019 15:29:31 +0000 (-0400) Subject: 15112: Fill in missing modified_at values from before #14595. X-Git-Tag: 1.4.0~60^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/67fd0a85ea38fd2c9c8ac2fc237ade47613d78e8 15112: Fill in missing modified_at values from before #14595. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/services/api/db/migrate/20190422144631_fill_missing_modified_at.rb b/services/api/db/migrate/20190422144631_fill_missing_modified_at.rb new file mode 100644 index 0000000000..5075e484bd --- /dev/null +++ b/services/api/db/migrate/20190422144631_fill_missing_modified_at.rb @@ -0,0 +1,11 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + +class FillMissingModifiedAt < ActiveRecord::Migration[5.0] + def up + Collection.where('modified_at is null').update_all('modified_at = created_at') + end + def down + end +end