liquid_feedback_core
annotate init.sql @ 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 | 58451b5565ae |
children | 6fce4f08157b |
rev | line source |
---|---|
jbe@0 | 1 -- NOTE: This file creates an admin user with an empty password! |
jbe@0 | 2 |
jbe@0 | 3 BEGIN; |
jbe@0 | 4 |
jbe@97 | 5 INSERT INTO "unit" ( |
jbe@97 | 6 "active", |
jbe@97 | 7 "name", |
jbe@97 | 8 "description" |
jbe@97 | 9 ) VALUES ( |
jbe@97 | 10 true, |
jbe@97 | 11 'Default unit', |
jbe@97 | 12 'Default unit created by init script.' |
jbe@97 | 13 ); |
jbe@97 | 14 |
jbe@97 | 15 |
jbe@0 | 16 INSERT INTO "member" ( |
jbe@0 | 17 "login", |
jbe@0 | 18 "password", |
jbe@0 | 19 "active", |
jbe@0 | 20 "admin", |
jbe@7 | 21 "name" |
jbe@0 | 22 ) VALUES ( |
jbe@0 | 23 'admin', |
jbe@9 | 24 '$1$.EMPTY.$LDufa24OE2HZFXAXh71Eb1', |
jbe@0 | 25 TRUE, |
jbe@0 | 26 TRUE, |
jbe@7 | 27 'Administrator' ); |
jbe@0 | 28 |
jbe@0 | 29 INSERT INTO "policy" ( |
jbe@9 | 30 "index", |
jbe@0 | 31 "active", |
jbe@0 | 32 "name", |
jbe@0 | 33 "description", |
jbe@0 | 34 "admission_time", |
jbe@0 | 35 "discussion_time", |
jbe@7 | 36 "verification_time", |
jbe@0 | 37 "voting_time", |
jbe@0 | 38 "issue_quorum_num", |
jbe@0 | 39 "issue_quorum_den", |
jbe@0 | 40 "initiative_quorum_num", |
jbe@0 | 41 "initiative_quorum_den" |
jbe@0 | 42 ) VALUES ( |
jbe@9 | 43 1, |
jbe@0 | 44 TRUE, |
jbe@0 | 45 'Extensive proceeding', |
jbe@0 | 46 DEFAULT, |
jbe@0 | 47 '1 month', |
jbe@7 | 48 '5 months', |
jbe@7 | 49 '1 month', |
jbe@0 | 50 '3 weeks', |
jbe@7 | 51 10, 100, |
jbe@7 | 52 10, 100 |
jbe@0 | 53 ), ( |
jbe@9 | 54 2, |
jbe@0 | 55 TRUE, |
jbe@0 | 56 'Standard proceeding', |
jbe@0 | 57 DEFAULT, |
jbe@7 | 58 '1 month', |
jbe@0 | 59 '1 month', |
jbe@0 | 60 '1 week', |
jbe@7 | 61 '1 week', |
jbe@7 | 62 10, 100, |
jbe@7 | 63 10, 100 |
jbe@0 | 64 ), ( |
jbe@9 | 65 3, |
jbe@0 | 66 TRUE, |
jbe@0 | 67 'Fast proceeding', |
jbe@0 | 68 DEFAULT, |
jbe@7 | 69 '48 hours', |
jbe@7 | 70 '3 hours', |
jbe@7 | 71 '1 hour', |
jbe@0 | 72 '20 hours', |
jbe@7 | 73 1, 100, |
jbe@0 | 74 1, 100 ); |
jbe@0 | 75 |
jbe@0 | 76 INSERT INTO "area" ( |
jbe@97 | 77 "unit_id", |
jbe@0 | 78 "active", |
jbe@0 | 79 "name", |
jbe@0 | 80 "description" |
jbe@0 | 81 ) VALUES ( |
jbe@97 | 82 1, |
jbe@0 | 83 TRUE, |
jbe@0 | 84 'Generic area', |
jbe@0 | 85 DEFAULT ); |
jbe@0 | 86 |
jbe@0 | 87 COMMIT; |