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: #15
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;