schambers/fluentmigrator — pull request #358 by ClockworkPenguin (2013-01-09 22:41:06+00:00)
Title: Remove incorrect override for SQLite identifer quotes

Strictly speaking, SQLite uses single quotes around string literals and double quotes around identifiers. Unfortunately, it's pretty lenient about letting you get it wrong - if it can work out which one you meant, it accepts the wrong one without complaint.

However, the one place where they do clash is in WHERE clauses. Specifically, I was having problems rolling back my last FluentMigrator migration - it would seem to execute the rollback fine, but when I tried to reapply the migration, it didn't recognise it. Attempting to rollback again revealed the problem - it was still trying to apply the same rollback (and failing), because it hadn't recorded that the last one had been run.

The problem was with the query to delete the rolled back migration from the VersionInfo table. Specifially, the query being executed was
```DELETE FROM 'VersionInfo' WHERE 'Version' = 201301082150```
The problem is that we're using single quotes to escape what ought to be an identifier. SQLite interprets it as a string literal, finds that there is no row in the VersionInfo table for which the string "Version" equals the integer 201301082150, and so deletes nothing. It lets FluentMigrator get away with the single quotes around VersionInfo, because it knows you can't have a string literal there and so it must be an identifier. The correct query is in fact
```DELETE FROM "VersionInfo" WHERE "Version" = 201301082150```

The fix is to simply remove the override in SqliteQuoter that changes the default OpenQuote and CloseQuote properties from double quotes (which are correct!) to single quotes (which aren't). This means that SqliteQuoter is actually now just GenericQuoter with no overrides. I've also updated all the tests that are affected (as far as I can tell).