Create initial schema.

This commit is contained in:
Ezra Gildesgame 2016-04-29 12:00:44 -04:00
parent 01f571cb77
commit df2e5ce0bd

View File

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