diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs index c826d640f1..0f6f832c66 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs @@ -357,9 +357,12 @@ namespace Umbraco.Core.Persistence.SqlSyntax if (column.DefaultValue == null) return string.Empty; - // see if this is for a system method // 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())) + if (column.DefaultValue.ToString().ToLower().Equals("getdate()".ToLower())) + return string.Format(DefaultValueFormat, column.DefaultValue); + + // see if this is for a system method + if (column.DefaultValue is SystemMethods) { string method = FormatSystemMethods((SystemMethods)column.DefaultValue); if (string.IsNullOrEmpty(method))