view README @ 380:0f5841ef67c6

Updated README file to include information on lf_update_suggestion_order
author jbe
date Mon Mar 18 13:50:01 2013 +0100 (2013-03-18)
parents 49c25dbc27bc
children e3dd2c3629db
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" and
13 "lf_update_suggestion_order dbname=liquid_feedback" are called
14 regularly! It is required to run these commands regularly
15 (i.e. every 5 minutes via cron) to update cached supporter counts,
16 to change the state of issues when neccessary, to calculate the
17 result of votings, etc. If you wish, copy the created lf_update
18 and lf_update_suggestion_order files to /usr/local/bin or a
19 similar directory.
21 It is possible to run these two commands in parallel, if a setup
22 requires splitting the load to multiple processor cores. In other
23 cases it is recommended to run "lf_update" first, and then
24 "lf_update_suggestion_order".
26 On successful run, these commands will not produce any output
27 and exit with code 0. The command "lf_update_suggestion_order" may
28 be called with a first argument of "-v" to print log output.
30 NOTE: When writing to the database, some INSERTs must be executed
31 within the same transaction, e.g. issues can't exist without
32 an initiative and vice versa.
34 To create an export file, which is containing all but private data,
35 you may use the lf_export shell-script:
36 $ lf_export liquid_feedback export.sql.gz
38 Refer to source code of function "delete_private_data"() to see,
39 which data gets deleted. If you need a different behaviour, please
40 copy the function and modify the lf_export shell script accordingly.
42 To uninstall the software, delete the lf_update binary
43 and drop the database by entering the following command:
44 $ dropdb liquid_feedback
46 Updating is done using the update scripts in the update/ directory.
47 Do not forget to make backups, before installing any updates.
48 After updating it is recommended to recreate the schema as follows
49 (assuming the database superuser is named "postgres"):
50 $ pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql
51 $ dropdb DATABASE_NAME
52 $ createdb DATABASE_NAME
53 $ psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME
54 $ su postgres # (execute following command as database superuser)
55 $ psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME
56 $ exit # leave "su" command
57 $ rm tmp.sql

Impressum / About Us