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