Skip to content

Commit 51ff3f8

Browse files
JaBistDuNarrischJaBistDuNarrisch
authored andcommitted
Strip single quotes on default values for int
1 parent 42ccfcc commit 51ff3f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Migrator/Providers/Impl/SqlServer/SqlServerTransformationProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,11 @@ public override Column[] GetColumns(string table)
452452

453453
if (column.Type == DbType.Int16 || column.Type == DbType.Int32 || column.Type == DbType.Int64)
454454
{
455-
column.DefaultValue = long.Parse(bracesStrippedString, CultureInfo.InvariantCulture);
455+
column.DefaultValue = long.Parse(bracesAndSingleQuoteStrippedString, CultureInfo.InvariantCulture);
456456
}
457457
else if (column.Type == DbType.UInt16 || column.Type == DbType.UInt32 || column.Type == DbType.UInt64)
458458
{
459-
column.DefaultValue = ulong.Parse(bracesStrippedString, CultureInfo.InvariantCulture);
459+
column.DefaultValue = ulong.Parse(bracesAndSingleQuoteStrippedString, CultureInfo.InvariantCulture);
460460
}
461461
else if (column.Type == DbType.Double || column.Type == DbType.Single)
462462
{

0 commit comments

Comments
 (0)