aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlatka Pavisic2017-02-14 13:38:29 +0100
committerVlatka Pavisic2017-02-14 13:38:40 +0100
commitd72d3a20e2faa2345d462ae64627b4cf46b6bb7b (patch)
tree8205eed6d98bf3d477d86f05e5b8014fd590cfce
parent015a22da0acb1e7010d7555b2cac1be08f044d6e (diff)
downloadchouette-core-d72d3a20e2faa2345d462ae64627b4cf46b6bb7b.tar.bz2
Refs #2596 : Fix migration
-rw-r--r--db/migrate/20170213135212_add_timestamps_to_some_models.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20170213135212_add_timestamps_to_some_models.rb b/db/migrate/20170213135212_add_timestamps_to_some_models.rb
index ba605e4eb..1502975fe 100644
--- a/db/migrate/20170213135212_add_timestamps_to_some_models.rb
+++ b/db/migrate/20170213135212_add_timestamps_to_some_models.rb
@@ -6,7 +6,7 @@ class AddTimestampsToSomeModels < ActiveRecord::Migration
models.each do |table|
if !column_exists?(table, :created_at) && column_exists?(table, :creation_time)
add_timestamps table
- Object.const_get("Chouette::#{table.to_s.classify}").record_class.update_all 'created_at = creation_time'
+ Object.const_get("Chouette::#{table.to_s.classify}").update_all 'created_at = creation_time'
end
remove_column table, :creation_time if column_exists?(table, :creation_time)
end