Closed nickmabry closed 9 years ago
Seems fine to me. It's always odd figuring out exactly what a driver is going to do.
Thanks for the crazy-fast response!
No problem. I know how frustrating it can be to wait on someone to merge your PR, so I try to turn things around quickly :+1:
Howdy! We were using
spectacles
to interface with a fairly complex Postgres view, created with a SQL string literal in a migration. When thecreate_view
call was serialized to Rails'schema.rb
, it contained unescaped double-quotes and would throw errors when restoring from schema.We're still not sure exactly when this is the case, but Postgres can return double-quotes in its
table_schema
for certain view tables. Our quick fix was to patch thespectacles
Postgres adapter to manually escape the returned SQL before ActiveRecord serialized it toschema.rb
.Please let me know if there's anything we can do to get this pushed upstream, or if this isn't an appropriate place for the fix. Thanks!