Skip to content

Commit

Permalink
Merge pull request #4125 from strapi/fix/default-datetime
Browse files Browse the repository at this point in the history
Do not set default timestamp value for date types
  • Loading branch information
alexandrebodin committed Sep 30, 2019
2 parents 8414636 + 8809766 commit a516e19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/strapi-hook-bookshelf/lib/buildDatabaseSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ const getType = ({ definition, attribute, name, tableExists = false }) => {
case 'date':
case 'time':
case 'datetime':
if (client === 'pg') {
return 'timestamp with time zone';
}

return 'timestamp';
case 'timestamp':
if (client === 'pg') {
return 'timestamp with time zone';
Expand Down

0 comments on commit a516e19

Please sign in to comment.