Skip to content

Commit cac4371

Browse files
committed
linting fix & test fail fixes
1 parent 7a1908f commit cac4371

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lib/transformer.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,21 @@ module.exports = {
4848
return new Sequelize(config.database, config.username, config.password, config)
4949
}
5050
},
51-
51+
5252
/**
5353
* Pick only SQL stores from app config
5454
* @param {Object} stores
5555
* @return {Object}
5656
*/
57-
pickStores (stores) {
58-
return _.pickBy(stores, (_store, name) => {
59-
return (_store.dialect && _.isString(_store.dialect))
60-
})
61-
},
57+
pickStores (stores) {
58+
return _.pickBy(stores, (_store, name) => {
59+
return ((_store.dialect && _.isString(_store.dialect))
60+
|| _.startsWith(_store.uri, 'mysql://')
61+
|| _.startsWith(_store.uri, 'mysql://')
62+
|| _.startsWith(_store.uri, 'postgresql://')
63+
|| _.startsWith(_store.uri, 'sqlite://'))
64+
})
65+
},
6266

6367
/**
6468
* Transform the Trails.js "stores" config into a Sequelize object

0 commit comments

Comments
 (0)