liquid_feedback_core
annotate README @ 139:e3bfa2d7954c
Always ensure stable voting results by disqualifying certain initiatives, and bugfix related to setting "issue_state" in "calculate_ranks"
- Removed column "majority_indirect" from table "policy"
- Removed column "eligible" from table "initiative" ("eligible" can be calculated as "attainable"=TRUE AND "favored"=TRUE AND "disqualified"=FALSE)
- Split "rank" column of table "initiative" into columns "preliminary_rank" and "final_rank"
- Added column "disqualified" to table "initiative"
- Removed column "promising" from table "initiative"
- Removed constraints from table "initiative"
- Updated functions "close_voting" and "calculate_ranks"
- Added TODO notice in function "clean_issue"
- Removed column "majority_indirect" from table "policy"
- Removed column "eligible" from table "initiative" ("eligible" can be calculated as "attainable"=TRUE AND "favored"=TRUE AND "disqualified"=FALSE)
- Split "rank" column of table "initiative" into columns "preliminary_rank" and "final_rank"
- Added column "disqualified" to table "initiative"
- Removed column "promising" from table "initiative"
- Removed constraints from table "initiative"
- Updated functions "close_voting" and "calculate_ranks"
- Added TODO notice in function "clean_issue"
author | jbe |
---|---|
date | Sun May 29 19:51:16 2011 +0200 (2011-05-29) |
parents | 92fc60ed705d |
children | fa394b8a0157 |
rev | line source |
---|---|
jbe@0 | 1 |
jbe@0 | 2 Setup the database: |
jbe@0 | 3 $ createdb liquid_feedback |
jbe@0 | 4 $ psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback |
jbe@0 | 5 |
jbe@0 | 6 Optionally insert demo data: |
jbe@0 | 7 $ psql -v ON_ERROR_STOP=1 -f demo.sql liquid_feedback |
jbe@0 | 8 |
jbe@0 | 9 Compile lf_update binary: |
jbe@0 | 10 $ make |
jbe@0 | 11 |
jbe@0 | 12 If you wish, copy the created lf_update file to /usr/local/bin or a |
jbe@0 | 13 similar directory. Ensure that "lf_update dbname=liquid_feedback" |
jbe@0 | 14 is called regularly. On successful run, lf_update will not produce |
jbe@0 | 15 any output and exit with code 0. |
jbe@0 | 16 |
jbe@0 | 17 NOTE: When writing to the database, some INSERTs must be executed |
jbe@0 | 18 within the same transaction, e.g. issues can't exist without |
jbe@0 | 19 an initiative and vice versa. |
jbe@0 | 20 |
jbe@8 | 21 To create an export file, which is containing all but private data, |
jbe@8 | 22 you may use the lf_export shell-script: |
jbe@8 | 23 $ lf_export liquid_feedback export.sql.gz |
jbe@8 | 24 |
jbe@0 | 25 To uninstall the software, delete the lf_update binary |
jbe@0 | 26 and drop the database by entering the following command: |
jbe@0 | 27 $ dropdb liquid_feedback |
jbe@0 | 28 |
jbe@120 | 29 Updating is done using the update scripts in the update/ directory. |
jbe@120 | 30 After updating it is recommended to recreate the schema as follows: |
jbe@120 | 31 $ pg_dump --disable-triggers --data-only DATABASE_NAME > tmp.sql |
jbe@120 | 32 $ dropdb DATABASE_NAME |
jbe@120 | 33 $ createdb DATABASE_NAME |
jbe@120 | 34 $ psql -v ON_ERROR_STOP=1 -f core.sql DATABASE_NAME |
jbe@120 | 35 $ psql -v ON_ERROR_STOP=1 -f tmp.sql DATABASE_NAME |
jbe@120 | 36 $ rm tmp.sql |
jbe@120 | 37 |