Avoid more models in old migrations
[rails.git] / db / migrate / 006_tile_nodes.rb
index 70a31fd..848dc97 100644 (file)
@@ -1,6 +1,14 @@
 require "migrate"
 
 class TileNodes < ActiveRecord::Migration[4.2]
+  class Node < ActiveRecord::Base
+    self.table_name = "current_nodes"
+  end
+
+  class OldNode < ActiveRecord::Base
+    self.table_name = "nodes"
+  end
+
   def self.upgrade_table(from_table, to_table, model)
     if ENV["USE_DB_FUNCTIONS"]
       execute <<-SQL