LinuxDoku / migratordotnet

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

Delete with multi-column where broken for SQL Server #128

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a row with an Up migration that has two fields:
    Database.Insert("MyTable", new[] { "Col1", "Col2" }, new[] { "Value", 
"Value"});
2. Try to remove it on a Down: 
    Database.Delete("MyTable", new[] { "Col1", "Col2" }, new[] { "Value", 
"Value"});
3. This will generate SQL like: DELETE FROM MyTable WHERE (Col1='Value', 
Col2='Value') which isn't valid

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

This occurs with migratordotnet 0.8.0

Original issue reported on code.google.com by gshutler on 15 Oct 2009 at 11:55

GoogleCodeExporter commented 8 years ago
It also happens in version 0.9.0.26940 of migrator.net running on windows XP 
connecting 
to sql server 2008 express.  

Original comment by ccp.ch...@gmail.com on 12 Mar 2010 at 8:09

GoogleCodeExporter commented 8 years ago
The ANSI standard says AND is valid here:
http://www.webmasterworld.com/databases_sql_mysql/3118974.htm

I'm getting stuck on this, so I'm going to submit a patch to our local version.

Original comment by chris.ma...@gmail.com on 14 Apr 2010 at 2:28

GoogleCodeExporter commented 8 years ago
I just updated our local build, it's working now - here's the patch I used.

Original comment by chris.ma...@gmail.com on 14 Apr 2010 at 5:56

Attachments: