How to setup the elections (Re: TODO list for the elections)


On Wed, November 16, 2005 20:29, Vincent Untz wrote:
Le mercredi 16 novembre 2005 à 07:13 -0800, Gregory Leblanc a écrit :
 * prepare the elections
   => it means adding one row in a sql database. It's not hard, but
      need the access rights to do it. I can do it if necessary.

I could grant myself rights to do it, but I don't know anything about
what needs to be done.  Is there any documentation for the database?

Not yet, but I have scripts that do most of the work. I'll try to upload
them somewhere. Please ping me if there's no news on this in a few days.

I put the scripts I used for the referendum there:

README contains some basic informations.

This should help you generate the temporary tokens for the elections and
to send the instructions mail.

Now, here's how I created the referendum in the database:

$ INSERT INTO `elections` ( `type`, `name`, `voting_start`, `voting_end`,
`choices_nb`, `question`) VALUES ('referendum', 'Reducing Board Size
Referendum', '2005-10-24 00:00:00', '2005-11-04 23:59:59', 1, 'Should the
board size be reduced from its current 11 directors to 7 directors?');

A similar command should be done for the elections. Then:

$ select * from elections;

This enables you to verify that your query went fine. Also note the id
for the elections you created. Let's call it $ID.

Now, you'll need to add all the candidates to the database too:

INSERT INTO `election_choices` (election_id, choice) VALUES ($ID, 'Dave

Verify that everything went fine:
$ select * from election_choices where election_id = $ID;

Note that I will add affiliations soon. I'll update these notes.

Then you can create the temporary tokens with the
script (use $ID for the elections id).

Before sending the voting instructions by mail, you should verify that
everything is working fine. Last time, I did by voting myself.

It's also probably a good thing to save the content of the database
before doing all of this, so you can restore it later if something
went wrong ;-) If you have any question/doubt, don't hesitate to ask.

Hope that helps,


Les gens heureux ne sont pas pressés.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]