0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Merge pull request #1861 from pogoapp/fix_pg_table_scan

fix table scan for pg migrations
This commit is contained in:
Hannah Wolfe 2014-01-06 13:37:16 -08:00
commit 63521e1ce8

View file

@ -144,9 +144,7 @@ function getTablesFromSqlite3() {
function getTablesFromPgSQL() {
return knex.raw("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'").then(function (response) {
return _.flatten(_.map(response[0], function (entry) {
return _.values(entry);
}));
return _.flatten(_.pluck(response.rows, 'table_name'));
});
}