mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:10:54 +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:
parent
d96289a81b
commit
510dd02a06
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user