1 # == Schema Information
3 # Table name: relation_members
5 # relation_id :bigint(8) 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
14 # relation_members_member_idx (member_type,member_id)
18 # relation_members_id_fkey (["relation_id", "version"] => relations.["relation_id", "version"])
21 class OldRelationMember < ApplicationRecord
22 self.table_name = "relation_members"
24 belongs_to :old_relation, :query_constraints => [:relation_id, :version], :inverse_of => :old_members
25 # A bit messy, referring to the current tables, should do for the data browser for now
26 belongs_to :member, :polymorphic => true
28 validates :member_role, :allow_blank => true, :length => { :maximum => 255 }, :characters => true