liquid_feedback_core

annotate README @ 597:d34f8403d2c6

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

Impressum / About Us