]> git.openstreetmap.org Git - rails.git/blob - app/models/old_relation_member.rb
Bump eslint from 8.6.0 to 8.7.0
[rails.git] / app / models / old_relation_member.rb
1 # == Schema Information
2 #
3 # Table name: relation_members
4 #
5 #  relation_id :bigint(8)        default(0), not null, primary key
6 #  member_type :enum             not null
7 #  member_id   :bigint(8)        not null
8 #  member_role :string           not null
9 #  version     :bigint(8)        default(0), not null, primary key
10 #  sequence_id :integer          default(0), not null, primary key
11 #
12 # Indexes
13 #
14 #  relation_members_member_idx  (member_type,member_id)
15 #
16 # Foreign Keys
17 #
18 #  relation_members_id_fkey  (relation_id => relations.relation_id)
19 #
20
21 class OldRelationMember < ApplicationRecord
22   self.table_name = "relation_members"
23   self.primary_keys = "relation_id", "version", "sequence_id"
24
25   belongs_to :old_relation, :foreign_key => [:relation_id, :version]
26   # A bit messy, referring to the current tables, should do for the data browser for now
27   belongs_to :member, :polymorphic => true
28 end