Fixed in edge rails: table name quoting
One of more annoying ActiveRecord bugs has finally been fixed in edge rails after 2 years. Table names in SQL queries are now properly escaped.
On nearly every project it seems I end up having a table name that doesn’t work in either MySQL or sqlite. While they usually are SQL reserved words, most databases allow you to use reserved words if they’re properly quoted.
The following, which doesn’t work in MySQL:
DELETE FROM values;
will now be:
DELETE FROM `values`;
This content is open source.
Suggest Improvements.