sougatamondal / migratordotnet

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

Case sensitive schemas cause internal exception on (in this case) column rename #127

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a DB with e.g. Swedish Collation_CS_AS
2. Create a table
3. Create a migration, renaming this table to the same name but different
casing.

Output:
[...]

INTERNAL ERROR

System.Data.SqlClient.SqlException: Invalid column name 'version'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
Boolea
n breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception
, Boolean breakConnection)
   at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, Tds
ParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
ds, Run
Behavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBe
havior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method,
DbAsyncResult
 result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehav
ior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior, S
tring method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
behav
ior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at Migrator.Providers.TransformationProvider.ExecuteQuery(String sql) in
c:\w
ork\other_projects\migratordotnet\migratordotnet-trunk\src\Migrator.Providers\Tr
ansformationProvider.cs:line 594
   at Migrator.Providers.TransformationProvider.Select(String what, String
from,
 String where) in
c:\work\other_projects\migratordotnet\migratordotnet-trunk\src
\Migrator.Providers\TransformationProvider.cs:line 620
   at Migrator.Providers.TransformationProvider.Select(String what, String
from)
 in
c:\work\other_projects\migratordotnet\migratordotnet-trunk\src\Migrator.Prov
iders\TransformationProvider.cs:line 615
   at Migrator.Providers.TransformationProvider.get_AppliedMigrations() in
c:\wo
rk\other_projects\migratordotnet\migratordotnet-trunk\src\Migrator.Providers\Tra
nsformationProvider.cs:line 747
   at Migrator.BaseMigrate..ctor(List`1 availableMigrations,
ITransformationProv
ider provider, ILogger logger) in
c:\work\other_projects\migratordotnet\migrator
dotnet-trunk\src\Migrator\BaseMigrate.cs:line 19
   at Migrator.MigrateAnywhere..ctor(List`1 availableMigrations,
ITransformation
Provider provider, ILogger logger) in
c:\work\other_projects\migratordotnet\migr
atordotnet-trunk\src\Migrator\MigrateAnywhere.cs:line 14
   at Migrator.BaseMigrate.GetInstance(List`1 availableMigrations,
ITransformati
onProvider provider, ILogger logger) in
c:\work\other_projects\migratordotnet\mi
gratordotnet-trunk\src\Migrator\BaseMigrate.cs:line 25
   at Migrator.Migrator.MigrateTo(Int64 version) in
c:\work\other_projects\migra
tordotnet\migratordotnet-trunk\src\Migrator\Migrator.cs:line 136
   at Migrator.NAnt.MigrateTask.RunMigration(Migrator mig) in
c:\work\other_proj
ects\migratordotnet\migratordotnet-trunk\src\Migrator.NAnt\MigrateTask.cs:line
1
74
   at Migrator.NAnt.MigrateTask.Execute(Assembly asm) in
c:\work\other_projects\
migratordotnet\migratordotnet-trunk\src\Migrator.NAnt\MigrateTask.cs:line 162
   at Migrator.NAnt.MigrateTask.ExecuteTask() in
c:\work\other_projects\migrator
dotnet\migratordotnet-trunk\src\Migrator.NAnt\MigrateTask.cs:line 138
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()

What is the expected output? What do you see instead?
Not an internal error. Success.

What version of the product are you using? On what operating system? With
what .NET implementation/version?
Latest d/lable version

What database and version are you seeing this issue on?
SQL Server 2008 Enterprise Ed.

Original issue reported on code.google.com by logi...@gmail.com on 3 Oct 2009 at 4:02

GoogleCodeExporter commented 8 years ago
This is because there are bugs in the code when it comes the casing. Fixed with 
patches.

Original comment by logi...@gmail.com on 3 Oct 2009 at 4:23

Attachments: