Keep track of USD value update datetime in DB

This commit is contained in:
Teemu Patja 2017-08-22 22:15:40 +03:00
parent 9cfd27a0b6
commit 31d8a07b97
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
3 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
ALTER TABLE "public"."issues" ADD COLUMN "value_usd_updated" timestamp without time zone;

View File

@ -342,7 +342,8 @@ WHERE contract_address = :contract_address;
-- :name update-usd-value :! :n
-- :doc updates issue with given USD value
UPDATE issues
SET value_usd = :usd_value
SET value_usd = :usd_value,
value_usd_updated = timezone('utc'::text, now())
WHERE contract_address = :contract_address;