X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3bd92c16704823e79ac61f27d05c1a9be52858f5..841cff678bc76179dd58c319c7dd09dd9dffe9dc:/app/models/way_node.rb diff --git a/app/models/way_node.rb b/app/models/way_node.rb index 957016b9d..0626fb240 100644 --- a/app/models/way_node.rb +++ b/app/models/way_node.rb @@ -1,8 +1,25 @@ -class WayNode < ActiveRecord::Base - set_table_name 'current_way_nodes' +# == Schema Information +# +# Table name: current_way_nodes +# +# way_id :bigint(8) not null, primary key +# node_id :bigint(8) not null +# sequence_id :bigint(8) not null, primary key +# +# Indexes +# +# current_way_nodes_node_idx (node_id) +# +# Foreign Keys +# +# current_way_nodes_id_fkey (way_id => current_ways.id) +# current_way_nodes_node_id_fkey (node_id => current_nodes.id) +# - set_primary_keys :id, :sequence_id - belongs_to :node +class WayNode < ApplicationRecord + self.table_name = "current_way_nodes" + self.primary_keys = "way_id", "sequence_id" - belongs_to :way, :foreign_key => :id + belongs_to :way + belongs_to :node end