2017-05-26 62 views
1

我在我的项目中有3 Model个对象。蒸气与Postgres - 表没有准备好

drop.preparations.append(Club.self) 
drop.preparations.append(ClubPlayers.self) 
drop.preparations.append(Player.self) 

由于某种原因,俱乐部桌子没有创建。这是我的prepare方法:

static func prepare(_ database: Database) throws { 
     try database.create(Club.tableName, closure: { club in 
      club.id() 
      club.string(Club.nameColumn) 
      club.string(Club.urlColumn) 
     }) 

} 

这正是构建为我的其他车型,但它是不是正在创建的唯一的一个。我没有收到任何警告或错误。 我使用Swift 3.1.1,蒸气1.5和蒸气工具箱2

+0

您需要使用正确的工具箱与蒸汽版本。使用Vapor 1.x,使用Toolbox 1.x('brew install vapor1')。如果您有Vapor 2.x,请使用Toolbox 2.x('brew install vapor')。 –

+2

尝试做'蒸汽准备--revert --all'然后再次运行您的应用程序。 – tanner0101

回答