previously, we had the idea of an election candidate:
create table election_candidate ( id serial unique not null, election_position_id int not null, approved boolean, member_id int not null, spiel text, CONSTRAINT "election_candidate_pkey" PRIMARY KEY (id), CONSTRAINT "election_candidate_election_position_id_fkey" FOREIGN KEY (org_id) references election_position(id) on update restrict, CONSTRAINT "election_candidate_member_id" FOREIGN KEY (member-id) references current_memberships(id) -- FIXME: need constraint that member is a member of the correct org. );
now, that’s all fine and good… but we need the whole nominations thing to work.
so what about something like this:
create table election_candidate_nomination ( when timestamp not null default now(), election_position_id int not null, from_member_id int not null, -- member doing the nominating for_member_id int not null, -- the member being nominated, reason text, CONSTRAINT "nomination_from_member_id_fkey" FOREIGN KEY (from_member_id) references members(id) on update restrict, CONSTRAINT "nomination_for_member_id_fkey" FOREIGN KEY (for_member_id) references members(id) on update restrict, CONSTRAINT "election_candidate_election_position_id_fkey" FOREIGN KEY (org_id) references election_position(id) on update restrict, );
this should be adequate to keep track of nominations. When enough nominations are gathered and the candidate accepts, then we can create an entry in election_candidate.