Format comment [ci skip]
Make upgrade_db() die on errors instead of returning false (this is more similar to what the rest of the system does)
Move the "evil SQL line" checking into its own subroutine, cover it with a unit test so we could refactor it afterwards
Simplify "DROP FUNCTION" exception
Redo the "allowed PostgreSQL response lines" regex into an extended one so that it's more maintainable and doesn't fill up horizontal space
Redo SQL statement into heredoc to conserve horizontal space
Print current / target SQL schema versions because that's useful for debugging and not that chatty
Remove unnecessary "MediaWords::Pg::Schema::" prefix
Simplify concatenation of the SQL upgrade script
Get rid of MediaWords::Pg::Schema::add_functions() because it's an opaque procedure, and it's more convenient to use a function which returns an actual SQL that's about to be imported
When printing out the upgrade SQL script instead of executing it directly, print out SQL function definitions too (the "stopwords" function at the moment)
Wrap upgrade script in a transaction
When printing out the SQL upgrade script, change output mode to UTF-8 because it might contain multibyte characters
Merge branch 'upgrade_db_single_transaction'