Merge pull request #978 from ezra-g/patch-1
Consider migrating schema in Getting Started Guide
This commit is contained in:
		
						commit
						c627e49002
					
				@ -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})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user