]> git.openstreetmap.org Git - rails.git/blob - app/models/old_relation_member.rb
Merge pull request #1151 from polarbearing/patch-1
[rails.git] / app / models / old_relation_member.rb
1 # == Schema Information
2 #
3 # Table name: relation_members
4 #
5 #  relation_id :integer          default(0), not null, primary key
6 #  member_type :enum             not null
7 #  member_id   :integer          not null
8 #  member_role :string           not null
9 #  version     :integer          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 < ActiveRecord::Base
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