view README @ 611:a94f7cb8ed19

Fixed bug in take_snapshot function regarding issue_privilege (use issue_id_p instead of issue_id_v)
author jbe
date Sun May 17 11:58:52 2020 +0200 (2020-05-17)
parents f50171274974
children 5b7c4082d7b3
line source
2 LiquidFeedback Core requires the pgLatLon extension to be installed.
3 This extension may be obtained from:
6 Setup the database:
7 $ createdb liquid_feedback
8 $ psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
10 Optionally insert demo data:
11 $ psql -v ON_ERROR_STOP=1 -f demo.sql liquid_feedback
13 Compile lf_update binary:
14 $ make
16 Ensure that "lf_update dbname=liquid_feedback",
17 "lf_update_issue_order dbname=liquid_feedback", and
18 "lf_update_suggestion_order dbname=liquid_feedback" are called
19 regularly! It is required to run these commands regularly
20 (i.e. every 5 minutes via cron) to update cached supporter counts,
21 to change the state of issues when neccessary, to calculate the
22 result of votings, etc. If you wish, copy the created lf_update
23 and lf_update_suggestion_order files to /usr/local/bin or a
24 similar directory.
26 It is possible to run these two commands in parallel, if a setup
27 requires splitting the load to multiple processor cores. In other
28 cases it is recommended to run "lf_update" first, and then
29 "lf_update_issue_order" and "lf_update_suggestion_order".
31 On successful run, these commands will not produce any output
32 and exit with code 0. The commands "lf_update_issue_order" and
33 "lf_update_suggestion_order" may be called with a first argument
34 of "-v" to print log output.
36 NOTE: When writing to the database, some INSERTs must be executed
37 within the same transaction, e.g. issues can't exist without
38 an initiative and vice versa.
40 To create an export file, which is containing all but private data,
41 you may use the lf_export shell-script:
42 $ lf_export liquid_feedback export.sql.gz
44 Refer to source code of function "delete_private_data"() to see,
45 which data gets deleted. If you need a different behaviour, please
46 copy the function and modify the lf_export shell script accordingly.
48 To uninstall the software, delete the lf_update binary
49 and drop the database by entering the following command:
50 $ dropdb liquid_feedback
52 Updating is done using the update scripts in the update/ directory.
53 Do not forget to make backups, before installing any updates.
54 After updating it is recommended to recreate the schema as follows
55 (assuming the database superuser is named "postgres"):
56 $ pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql
57 $ dropdb DATABASE_NAME
58 $ createdb DATABASE_NAME
59 $ psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME
60 $ su postgres # (execute following command as database superuser)
61 $ psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME
62 $ exit # leave "su" command
63 $ rm tmp.sql
65 NOTE: If PostgreSQL fails to locate the extensions' datatypes, it may
66 be necessary to add 'public' to the 'search_path' variable in
67 the data-only export (tmp.sql in the example above), which is
68 set by the function call pg_catalog.set_config(...).

Impressum / About Us