liquid_feedback_core

view README @ 623:8dc9b96cc5db

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

Impressum / About Us