0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

fix table scan for pg migrations

This commit is contained in:
Paul 2014-01-06 16:32:20 -03:00
parent 31db4dc75e
commit b90752114e

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'));
});
}