Okay, really fixed the getdate() problem now. Maybe.. I should.. You know.. build my code first before I test it! D'oh.

This commit is contained in:
Sebastiaan Janssen
2013-01-02 11:49:57 -01:00
parent ecd3f3c54d
commit 55dbce3a93

View File

@@ -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))