diff --git a/resources/migrations/20170822212911-store-usd-value-updated-datetime.down.sql b/resources/migrations/20170822212911-store-usd-value-updated-datetime.down.sql new file mode 100644 index 0000000..e69de29 diff --git a/resources/migrations/20170822212911-store-usd-value-updated-datetime.up.sql b/resources/migrations/20170822212911-store-usd-value-updated-datetime.up.sql new file mode 100644 index 0000000..9ba362c --- /dev/null +++ b/resources/migrations/20170822212911-store-usd-value-updated-datetime.up.sql @@ -0,0 +1 @@ +ALTER TABLE "public"."issues" ADD COLUMN "value_usd_updated" timestamp without time zone; diff --git a/resources/sql/queries.sql b/resources/sql/queries.sql index 4fdbfbf..e25dc94 100644 --- a/resources/sql/queries.sql +++ b/resources/sql/queries.sql @@ -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;