# HG changeset patch # User jbe # Date 1342382610 -7200 # Node ID 30465830ad9cfb54bd41b3710b3cbbcc2e47a95d # Parent e02b8c492e26f3387e1fe6827b2fa9a398dfcc5a For "polling" policies "admission_time" is always NULL diff -r e02b8c492e26 -r 30465830ad9c core.sql --- a/core.sql Sun Jul 15 21:57:13 2012 +0200 +++ b/core.sql Sun Jul 15 22:03:30 2012 +0200 @@ -354,7 +354,7 @@ "admission_time" NOTNULL AND "discussion_time" NOTNULL AND "verification_time" NOTNULL AND "voting_time" NOTNULL ) OR ( "polling" = TRUE AND - "admission_time" NOTNULL AND "discussion_time" NOTNULL AND + "admission_time" ISNULL AND "discussion_time" NOTNULL AND "verification_time" NOTNULL AND "voting_time" NOTNULL ) OR ( "polling" = TRUE AND "admission_time" ISNULL AND "discussion_time" ISNULL AND @@ -365,7 +365,7 @@ COMMENT ON COLUMN "policy"."index" IS 'Determines the order in listings'; COMMENT ON COLUMN "policy"."active" IS 'TRUE = policy can be used for new issues'; -COMMENT ON COLUMN "policy"."polling" IS 'TRUE = special policy for non-user-generated issues, i.e. polls (time values may be set to NULL, allowing individual timing for issues)'; +COMMENT ON COLUMN "policy"."polling" IS 'TRUE = special policy for non-user-generated issues, i.e. polls ("admission_time" MUST be set to NULL, the other timings may be set to NULL altogether, allowing individual timing for issues)'; COMMENT ON COLUMN "policy"."admission_time" IS 'Maximum duration of issue state ''admission''; Maximum time an issue stays open without being "accepted"'; COMMENT ON COLUMN "policy"."discussion_time" IS 'Duration of issue state ''discussion''; Regular time until an issue is "half_frozen" after being "accepted"'; COMMENT ON COLUMN "policy"."verification_time" IS 'Duration of issue state ''verification''; Regular time until an issue is "fully_frozen" (e.g. entering issue state ''voting'') after being "half_frozen"'; diff -r e02b8c492e26 -r 30465830ad9c update/core-update.v2.0.11-v2.1.0.sql --- a/update/core-update.v2.0.11-v2.1.0.sql Sun Jul 15 21:57:13 2012 +0200 +++ b/update/core-update.v2.0.11-v2.1.0.sql Sun Jul 15 22:03:30 2012 +0200 @@ -14,12 +14,12 @@ "admission_time" NOTNULL AND "discussion_time" NOTNULL AND "verification_time" NOTNULL AND "voting_time" NOTNULL ) OR ( "polling" = TRUE AND - "admission_time" NOTNULL AND "discussion_time" NOTNULL AND + "admission_time" ISNULL AND "discussion_time" NOTNULL AND "verification_time" NOTNULL AND "voting_time" NOTNULL ) OR ( "polling" = TRUE AND "admission_time" ISNULL AND "discussion_time" ISNULL AND "verification_time" ISNULL AND "voting_time" ISNULL ) ); -COMMENT ON COLUMN "policy"."polling" IS 'TRUE = special policy for non-user-generated issues, i.e. polls (time values may be set to NULL, allowing individual timing for issues)'; +COMMENT ON COLUMN "policy"."polling" IS 'TRUE = special policy for non-user-generated issues, i.e. polls ("admission_time" MUST be set to NULL, the other timings may be set to NULL altogether, allowing individual timing for issues)'; ALTER TABLE "initiative" ADD COLUMN "polling" BOOLEAN NOT NULL DEFAULT FALSE; COMMENT ON COLUMN "initiative"."polling" IS 'Initiative is an option for a poll (see "policy"."polling"), and does not need to pass the initiative quorum';