Fixes issue with migrations running with a Decimal column:

The logic would produce incorrect syntax.
Fixed the default string column for sql server, made them all consistent.
Moved ctor logic for shared sql syntax providers to the base class.
Created formatted Decimal column definitions so that a custom precision/scale works.
Set the migration to use the default precision/scale values.
Removes the pattern validators because they don't do anything... due to the fix-number directive which has it's own issues but we won't solve those now.
This commit is contained in:
Shannon
2015-10-14 12:07:50 +02:00
parent d92af31b0a
commit 327a00aaf4
9 changed files with 37 additions and 38 deletions

View File

@@ -13,19 +13,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
{
public SqlServerSyntaxProvider()
{
StringLengthColumnDefinitionFormat = StringLengthUnicodeColumnDefinitionFormat;
StringColumnDefinition = string.Format(StringLengthColumnDefinitionFormat, DefaultStringLength);
AutoIncrementDefinition = "IDENTITY(1,1)";
StringColumnDefinition = "VARCHAR(8000)";
GuidColumnDefinition = "UniqueIdentifier";
RealColumnDefinition = "FLOAT";
BoolColumnDefinition = "BIT";
DecimalColumnDefinition = "DECIMAL(38,6)";
TimeColumnDefinition = "TIME"; //SQLSERVER 2008+
BlobColumnDefinition = "VARBINARY(MAX)";
InitColumnTypeMap();
}
/// <summary>