X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..50e5d6a65934fd22129aa9e450db0b821c7750b0:/app/models/old_node_tag.rb diff --git a/app/models/old_node_tag.rb b/app/models/old_node_tag.rb index c710e48f1..8f632a671 100644 --- a/app/models/old_node_tag.rb +++ b/app/models/old_node_tag.rb @@ -9,14 +9,13 @@ # # Foreign Keys # -# node_tags_id_fkey (node_id => nodes.node_id) +# node_tags_id_fkey (["node_id", "version"] => nodes.["node_id", "version"]) # class OldNodeTag < ApplicationRecord self.table_name = "node_tags" - self.primary_keys = "node_id", "version", "k" - belongs_to :old_node, :foreign_key => [:node_id, :version], :inverse_of => :old_tags + belongs_to :old_node, :query_constraints => [:node_id, :version], :inverse_of => :old_tags validates :old_node, :associated => true validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }, :characters => true