1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 21:01:31 +00:00

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

View File

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