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)
558558
559559 if ( ! string . IsNullOrWhiteSpace ( dataDefaultString ) )
560560 {
561+ // This is only necessary because older versions of this migrator added single quotes for numerics.
562+ var singleQuoteStrippedString = dataDefaultString . Replace ( "'" , "" ) ;
563+
561564 if ( column . Type == DbType . Int16 || column . Type == DbType . Int32 || column . Type == DbType . Int64 )
562565 {
563- column . DefaultValue = long . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
566+ column . DefaultValue = long . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
564567 }
565568 else if ( column . Type == DbType . Double )
566569 {
567- column . DefaultValue = double . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
570+ column . DefaultValue = double . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
568571 }
569572 else if ( column . Type == DbType . Single )
570573 {
571- column . DefaultValue = float . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
574+ column . DefaultValue = float . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
572575 }
573576 else if ( column . Type == DbType . Decimal )
574577 {
575- column . DefaultValue = decimal . Parse ( dataDefaultString , CultureInfo . InvariantCulture ) ;
578+ column . DefaultValue = decimal . Parse ( singleQuoteStrippedString , CultureInfo . InvariantCulture ) ;
576579 }
577580 else if ( column . Type == DbType . Boolean )
578581 {
You can’t perform that action at this time.
0 commit comments