blob: 6280ba9a8c859a07e585e04df023168656e6f0d8 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
 | class SetUpdatedAt < ActiveRecord::Migration
  def up
    models = %w(VehicleJourney TimeTable StopPoint StopArea RoutingConstraintZone Route PtLink Network Line
     JourneyPattern GroupOfLine ConnectionLink Company AccessPoint AccessLink)
    models.each do |table|
      "Chouette::#{table}".constantize.where(updated_at: nil).update_all('updated_at = created_at')
    end
  end
  def down
  end
end
 |