diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs index 541100ae4d..8439daa1c7 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs @@ -164,7 +164,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax return string.Format(DefaultValueFormat, method); } - if (column.DefaultValue.ToString().Equals("getdate()")) + if (column.DefaultValue.ToString().ToLower().Equals("getdate()".ToLower())) return "DEFAULT CURRENT_TIMESTAMP"; return string.Format(DefaultValueFormat, column.DefaultValue); diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs index 65cc4401d6..c826d640f1 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs @@ -358,7 +358,8 @@ namespace Umbraco.Core.Persistence.SqlSyntax return string.Empty; // see if this is for a system method - if (column.DefaultValue is SystemMethods) + // TODO: Actually use the SystemMethods on the DTO. For now I've put a hack in to catch getdate(), not using the others at the moment + if (column.DefaultValue is SystemMethods || column.DefaultValue.ToString().ToLower().Equals("getdate()".ToLower())) { string method = FormatSystemMethods((SystemMethods)column.DefaultValue); if (string.IsNullOrEmpty(method))