2017-05-26 120 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

回答