view README @ 320:3a7f06a88ecb

Calculate "harmonic_weight" to be used as a secondary sorting key, while the "admitted" flag shall be used as the primary sorting key for initiatives
author jbe
date Fri Feb 08 18:26:25 2013 +0100 (2013-02-08)
parents 9ef1765082a7
children 49c25dbc27bc
line source
2 Setup the database:
3 $ createdb liquid_feedback
4 $ psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
6 Optionally insert demo data:
7 $ psql -v ON_ERROR_STOP=1 -f demo.sql liquid_feedback
9 Compile lf_update binary:
10 $ make
12 Ensure that "lf_update dbname=liquid_feedback" is called regularly!
14 It is required that lf_update is executed regulary (i.e. every
15 5 minutes via cron) to update cached supporter counts, to change
16 the state of issues when neccessary, and to calculate the result
17 of votings. If you wish, copy the created lf_update file to
18 /usr/local/bin or a similar directory.
20 On successful run, lf_update will not produce any output
21 and exit with code 0.
23 NOTE: When writing to the database, some INSERTs must be executed
24 within the same transaction, e.g. issues can't exist without
25 an initiative and vice versa.
27 To create an export file, which is containing all but private data,
28 you may use the lf_export shell-script:
29 $ lf_export liquid_feedback export.sql.gz
31 Refer to source code of function "delete_private_data"() to see,
32 which data gets deleted. If you need a different behaviour, please
33 copy the function and modify the lf_export shell script accordingly.
35 To uninstall the software, delete the lf_update binary
36 and drop the database by entering the following command:
37 $ dropdb liquid_feedback
39 Updating is done using the update scripts in the update/ directory.
40 After updating it is recommended to recreate the schema as follows
41 (assuming the database superuser is named "postgres"):
42 $ pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql
43 $ dropdb DATABASE_NAME
44 $ createdb DATABASE_NAME
45 $ psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME
46 $ su postgres # (execute following command as database superuser)
47 $ psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME
48 $ exit # leave "su" command
49 $ rm tmp.sql

Impressum / About Us