2
0
mirror of https://github.com/status-im/open-bounty.git synced 2025-02-15 19:06:51 +00:00
open-bounty/resources/migrations/20170121175409-fix-timestamp-column-datatypes.up.sql
Teemu Patja 8cb5995d5a
Use SQL timestamp instead of time
* Use SQL data type timestamp for users.created and
  repositories.updated since we want to store datetimes, not time of
  day
* Fix :migration-dir in project file

Fixes: 
2017-01-21 18:06:37 +02:00

3 lines
251 B
SQL

ALTER TABLE public.users ALTER COLUMN created SET DATA TYPE timestamp without time zone using date('20170120') + created;
ALTER TABLE public.repositories ALTER COLUMN updated SET DATA TYPE timestamp without time zone using date('20170120') + updated;