Fix the quick start section of the orm/README.md

Increase the init method by adding the `RunSyncdb` method to resolve the problem that the table is not created.
This commit is contained in:
Erik 2017-08-11 11:34:18 +08:00 committed by GitHub
parent d96289a81b
commit 510dd02a06
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ func init() {
// set default database
orm.RegisterDataBase("default", "mysql", "root:root@/my_db?charset=utf8", 30)
// create table
orm.RunSyncdb("default", false, true)
}
func main() {