不要怂,就是干,撸起袖子干!

Commit f293a111 by Martin Aspeli

Create tables in dependency order

1 parent 556a6639
Showing with 6 additions and 3 deletions
...@@ -261,11 +261,14 @@ module.exports = (function() { ...@@ -261,11 +261,14 @@ module.exports = (function() {
var chainer = new Utils.QueryChainer() var chainer = new Utils.QueryChainer()
this.daoFactoryManager.daos.forEach(function(dao) { // Topologically sort by foreign key constraints to give us an appropriate
chainer.add(dao.sync(options)) // creation order
this.daoFactoryManager.forEachDAO(function(dao) {
chainer.add(dao, 'sync', [options])
}) })
return chainer.run() return chainer.runSerially()
} }
Sequelize.prototype.drop = function() { Sequelize.prototype.drop = function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!