Merge pull request #978 from ezra-g/patch-1

Consider migrating schema in Getting Started Guide
This commit is contained in:
Jinzhu 2016-05-02 19:37:43 +08:00
commit c627e49002

View File

@ -53,6 +53,9 @@ func main() {
panic("failed to connect database")
}
// Migrate the schema
db.AutoMigrate(&Product{})
// Create
db.Create(&Product{Code: "L1212", Price: 1000})