-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Problem example
For given table:
CREATE TABLE weekly_survey_requests(
created_at TIMESTAMP DEFAULT NOW(),
expired_at TIMESTAMP,
id uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY,
question_id uuid REFERENCES questions (id) ON DELETE CASCADE,
responded_at TIMESTAMP,
updated_at TIMESTAMP DEFAULT NOW(),
user_id uuid REFERENCES users (id) ON DELETE CASCADE,
user_sumission_id uuid REFERENCES users_submissions (id) ON DELETE SET NULL
);
I want to update existing record with a current timestamp using SQL now()
function, but when I execute this query:
(defn- expire-active-weekly-question-requests [{:keys [env]}]
(penkala/update! env
(-> (r/->updatable (:weekly-survey-requests env))
(r/where [:is-not-null :expired-at])
(r/where [:is-null :responded-at]))
{:expired-at [:now]}))
i get the following error:
“Column \“expired_at\” is of type timestamp without time zone but expression is of type jsonb”}
Metadata
Metadata
Assignees
Labels
No labels