Create initial schema.
This commit is contained in:
		
							parent
							
								
									01f571cb77
								
							
						
					
					
						commit
						df2e5ce0bd
					
				@ -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