liquid_feedback_core

diff core.sql @ 515:ab05fb3bf974

Set column "notification_hour" of "member" table by default to random number
author jbe
date Sun Apr 17 17:36:41 2016 +0200 (2016-04-17)
parents 705097d1b1f3
children e4f619e87664
line diff
     1.1 --- a/core.sql	Sun Apr 17 15:14:14 2016 +0200
     1.2 +++ b/core.sql	Sun Apr 17 17:36:41 2016 +0200
     1.3 @@ -117,7 +117,7 @@
     1.4          "notification_counter"     INT4         NOT NULL DEFAULT 1,
     1.5          "notification_sample_size" INT4         NOT NULL DEFAULT 3,
     1.6          "notification_dow"         INT4         CHECK ("notification_dow" BETWEEN 0 AND 6),
     1.7 -        "notification_hour"        INT4         CHECK ("notification_hour" BETWEEN 0 AND 23),
     1.8 +        "notification_hour"        INT4         DEFAULT floor(random() * 24) CHECK ("notification_hour" BETWEEN 0 AND 23),
     1.9          "notification_sent"        TIMESTAMP,
    1.10          "login_recovery_expiry"        TIMESTAMPTZ,
    1.11          "password_reset_secret"        TEXT     UNIQUE,

Impressum / About Us