From 67fd0a85ea38fd2c9c8ac2fc237ade47613d78e8 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Mon, 22 Apr 2019 11:29:31 -0400 Subject: [PATCH] 15112: Fill in missing modified_at values from before #14595. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- .../20190422144631_fill_missing_modified_at.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 services/api/db/migrate/20190422144631_fill_missing_modified_at.rb 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 -- 2.30.2