This commit is contained in:
Morten Christensen
2013-01-02 14:28:40 -01:00
2 changed files with 5 additions and 1 deletions

View File

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

View File

@@ -357,6 +357,10 @@ namespace Umbraco.Core.Persistence.SqlSyntax
if (column.DefaultValue == null)
return string.Empty;
// 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.ToString().ToLower().Equals("getdate()".ToLower()))
return string.Format(DefaultValueFormat, column.DefaultValue);
// see if this is for a system method
if (column.DefaultValue is SystemMethods)
{