0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fix failing migration.reset for Postgres.

refs #1333
This commit is contained in:
Fabian Becker 2013-11-26 09:35:33 +00:00
parent a193779a73
commit 0169f47752

View file

@ -142,10 +142,12 @@ function getTablesFromSqlite3() {
});
}
// Basic suppport for PgSQL
// Attention: not officially tested/supported
function getTablesFromPgSQL() {
return knex.raw("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'");
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);
}));
});
}
function getTablesFromMySQL() {