mirror of
https://github.com/strapi/strapi.git
synced 2025-11-15 17:49:57 +00:00
Merge pull request #969 from juampynr/fix-mysql-5.7
Fix invalid timestamp default values for MySQL 5.7
This commit is contained in:
commit
21ed0156a0
@ -34,8 +34,8 @@ module.exports = async cb => {
|
|||||||
size text,
|
size text,
|
||||||
url text,
|
url text,
|
||||||
provider text,
|
provider text,
|
||||||
updated_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp'},
|
updated_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'},
|
||||||
created_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp'}
|
created_at ${Model.client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP'}
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE ${quote}upload_file_morph${quote} (
|
CREATE TABLE ${quote}upload_file_morph${quote} (
|
||||||
|
|||||||
@ -460,8 +460,8 @@ CREATE TABLE ${quote}${details[currentModel].tableName}${quote} (
|
|||||||
role ${details[currentModel].client === 'pg' ? 'integer' : 'int'},
|
role ${details[currentModel].client === 'pg' ? 'integer' : 'int'},
|
||||||
${quote}resetPasswordToken${quote} text,
|
${quote}resetPasswordToken${quote} text,
|
||||||
password text,
|
password text,
|
||||||
updated_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp'},
|
updated_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'},
|
||||||
created_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp'}
|
created_at ${details[currentModel].client === 'pg' ? 'timestamp with time zone' : 'timestamp DEFAULT CURRENT_TIMESTAMP'}
|
||||||
);`);
|
);`);
|
||||||
break;
|
break;
|
||||||
case 'role':
|
case 'role':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user