1 class OldWayTag < ActiveRecord::Base
2 self.table_name = "way_tags"
3 self.primary_keys = "way_id", "version", "k"
5 belongs_to :old_way, :foreign_key => [:way_id, :version]
7 validates :old_way, :presence => true, :associated => true
8 validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }
9 validates :k, :uniqueness => { :scope => [:way_id, :version] }