liquid_feedback_core
view README @ 353:31ce1877320b
Extended "lf_update_suggestion_order" to create a candidate structure
| author | jbe | 
|---|---|
| date | Sat Mar 16 18:19:15 2013 +0100 (2013-03-16) | 
| parents | 49c25dbc27bc | 
| children | 0f5841ef67c6 | 
 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" is called regularly!
    14 It is required that lf_update is executed regulary (i.e. every
    15 5 minutes via cron) to update cached supporter counts, to change
    16 the state of issues when neccessary, and to calculate the result
    17 of votings. If you wish, copy the created lf_update file to
    18 /usr/local/bin or a similar directory.
    20 On successful run, lf_update will not produce any output
    21 and exit with code 0.
    23 NOTE: When writing to the database, some INSERTs must be executed
    24       within the same transaction, e.g. issues can't exist without
    25       an initiative and vice versa.
    27 To create an export file, which is containing all but private data,
    28 you may use the lf_export shell-script:
    29 $ lf_export liquid_feedback export.sql.gz
    31 Refer to source code of function "delete_private_data"() to see,
    32 which data gets deleted. If you need a different behaviour, please
    33 copy the function and modify the lf_export shell script accordingly.
    35 To uninstall the software, delete the lf_update binary
    36 and drop the database by entering the following command:
    37 $ dropdb liquid_feedback
    39 Updating is done using the update scripts in the update/ directory.
    40 Do not forget to make backups, before installing any updates.
    41 After updating it is recommended to recreate the schema as follows
    42 (assuming the database superuser is named "postgres"):
    43 $ pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql
    44 $ dropdb DATABASE_NAME
    45 $ createdb DATABASE_NAME
    46 $ psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME
    47 $ su postgres  # (execute following command as database superuser)
    48 $ psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME
    49 $ exit         # leave "su" command
    50 $ rm tmp.sql
