From ae282e2eac8dedde62a957912dcb0b4e5e4bc7c6 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Thu, 8 Mar 2018 20:40:45 -0800 Subject: Refs #6033 Update all StopArea#confirmed_at --- .../20180308063549_update_stop_areas_confirmed_at_attribute.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20180308063549_update_stop_areas_confirmed_at_attribute.rb diff --git a/db/migrate/20180308063549_update_stop_areas_confirmed_at_attribute.rb b/db/migrate/20180308063549_update_stop_areas_confirmed_at_attribute.rb new file mode 100644 index 000000000..7bc0471f7 --- /dev/null +++ b/db/migrate/20180308063549_update_stop_areas_confirmed_at_attribute.rb @@ -0,0 +1,9 @@ +class UpdateStopAreasConfirmedAtAttribute < ActiveRecord::Migration + def up + Chouette::StopArea.where(deleted_at: nil).update_all(confirmed_at: Time.now) + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end -- cgit v1.2.3