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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user