]> git.openstreetmap.org Git - rails.git/blob - app/models/old_way_node.rb
Fix rubocop warning
[rails.git] / app / models / old_way_node.rb
1 # == Schema Information
2 #
3 # Table name: way_nodes
4 #
5 #  way_id      :bigint(8)        not null, primary key
6 #  node_id     :bigint(8)        not null
7 #  version     :bigint(8)        not null, primary key
8 #  sequence_id :bigint(8)        not null, primary key
9 #
10 # Indexes
11 #
12 #  way_nodes_node_idx  (node_id)
13 #
14 # Foreign Keys
15 #
16 #  way_nodes_id_fkey  (["way_id", "version"] => ways.["way_id", "version"])
17 #
18
19 class OldWayNode < ApplicationRecord
20   self.table_name = "way_nodes"
21
22   belongs_to :old_way, :query_constraints => [:way_id, :version], :inverse_of => :old_nodes
23   # A bit messy, referring to current nodes and ways, should do for the data browser for now
24   belongs_to :node
25   belongs_to :way
26 end