tgriesser/knex — pull request #433 by myndzi (2014-08-22 22:03:45+00:00)
Title: Fix .dropColumn in sqlite3

Presumably sqlite3 doesn't have an 'alter table drop column', since the code appears to be making a copy of the table, with the intent of making the table without the column being dropped, and copying the data over. However, the code was appending a comma to the table definition and using replace to remove it; this didn't work on the last column in the list, since it wasn't followed with a column. Instead, I removed the appended comma before the sanity check, then "fixed up" the query by removing redundant commas. Note: the regex should probably be //g, but since the function in question only drops one column, I felt it better to leave it this way.