sougatamondal / migratordotnet

Automatically exported from code.google.com/p/migratordotnet
0 stars 0 forks source link

Retrieving the list of migrations currently applied to the database fails on Oracle with the Oracle ODP.NET driver 10.1.0.400 #118

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a migration with version number 20090507150000
2. Execute the migration on an Oracle database
3. List the migrations using the Migrator.Migrator.AppliedMigrations

What is the expected output? What do you see instead?
Expected output is a list containing the migration, 20090507150000
An exception is thrown: The specified cast is not valid.

What version of the product are you using?
migratordonet.0.8.0
On what operating system?
Windows XP
With what .NET implementation/version?
.NET 3.5 (VS2008)

What database and version are you seeing this issue on?
Oracle 10.1.0; Oracle.DataAccess.dll has version number 10.1.0.400 (this 
is the dll installed by Oracle and not the driver which comes with 
migratordotnet - this has version number 2.111.5.10 but does not work with 
the installed Oracle 10.1.0).

Please provide any additional information below.
This comes from an InvalidCastException thrown in 
Migrator.Providers.TransformationProvider.AppliedMigrations at line 
appliedMigrations.Add(reader.GetInt64(0));
The datatype returned from the Oracle provider is a decimal, getting this 
value using a GetInt64() fails.

Original issue reported on code.google.com by paul.dhe...@gmail.com on 2 Jun 2009 at 2:06

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Problem can be fixed by replacing _appliedMigrations.Add(reader.GetInt64(0)); 
with 
_appliedMigrations.Add(Convert.ToInt64(reader.GetValue(0)));
See updated TransformationProvider.cs in attachment.

Original comment by paul.dhe...@gmail.com on 3 Jun 2009 at 9:01

Attachments:

GoogleCodeExporter commented 8 years ago
Svn 145
Applied change

Original comment by geoffl...@gmail.com on 25 Mar 2010 at 10:35