File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/Migrator/Providers/Impl/Oracle Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -558,21 +558,24 @@ public override Column[] GetColumns(string table)
558
558
559
559
if ( ! string . IsNullOrWhiteSpace ( dataDefaultString ) )
560
560
{
561
+ // This is only necessary because older versions of this migrator added single quotes for numerics.
562
+ var singleQuoteStrippedString = dataDefaultString . Replace ( "'" , "" ) ;
563
+
561
564
if ( column . Type == DbType . Int16 || column . Type == DbType . Int32 || column . Type == DbType . Int64 )
562
565
{
563
- column . DefaultValue = long . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
566
+ column . DefaultValue = long . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
564
567
}
565
568
else if ( column . Type == DbType . Double )
566
569
{
567
- column . DefaultValue = double . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
570
+ column . DefaultValue = double . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
568
571
}
569
572
else if ( column . Type == DbType . Single )
570
573
{
571
- column . DefaultValue = float . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
574
+ column . DefaultValue = float . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
572
575
}
573
576
else if ( column . Type == DbType . Decimal )
574
577
{
575
- column . DefaultValue = decimal . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
578
+ column . DefaultValue = decimal . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
576
579
}
577
580
else if ( column . Type == DbType . Boolean )
578
581
{
You can’t perform that action at this time.
0 commit comments