…rformance problem (GH #3678)
A recent change made to create_table does away with the need for the block argument. Checking the arity will prevent the mixing up of the two syntaxes.
This is a first implementation, EXPLAIN is highly dependent on the database and I have made some compromises. On one hand, the method allows you to run the most common EXPLAIN and that's it. If you want EXPLAIN ANALYZE in PostgreSQL you need to do it by hand. On the other hand, I've tried to construct a string as close as possible to the ones built by the respective shells. The rationale is that IMO the user should feel at home with the output and recognize it at first sight. Per database. I don't know whether this implementation is going to work well. Let's see whether people like it.
…ons table This change reduces churn in the db/development_structure.sql file when using :sql as active_record.schema_format, and makes comparing diffs much easier. Test ensures the output SQL-statements are lexically ordered by version.
…n has a case sensitive collation.
…y to maintain appropriate linkage with AR database connection across threads
To allow the use of prepared statements when changing schemas in postgres, the schema search path is added to the sql key.