diff options
| author | cedricnjanga | 2018-03-08 20:40:45 -0800 |
|---|---|---|
| committer | Alban Peignier | 2018-03-15 10:00:36 +0100 |
| commit | ae282e2eac8dedde62a957912dcb0b4e5e4bc7c6 (patch) | |
| tree | 0401ae733877dfa70e71fd8484c78d0e802a17fa /db | |
| parent | 18fbb9be2993bcffa4183d4e45b4759088a19075 (diff) | |
| download | chouette-core-ae282e2eac8dedde62a957912dcb0b4e5e4bc7c6.tar.bz2 | |
Refs #6033 Update all StopArea#confirmed_at
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20180308063549_update_stop_areas_confirmed_at_attribute.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
