Merge pull request #4125 from strapi/fix/default-datetime

Do not set default timestamp value for date types
This commit is contained in:
Alexandre BODIN 2019-09-30 10:06:09 +02:00 committed by GitHub
commit a516e197b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';