Quote db name when create primary keys
This commit is contained in:
		
							parent
							
								
									c2dda88f9a
								
							
						
					
					
						commit
						cbebcf6d6f
					
				@ -475,7 +475,7 @@ func (scope *Scope) createTable() *Scope {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if field.IsPrimaryKey {
 | 
							if field.IsPrimaryKey {
 | 
				
			||||||
			primaryKeys = append(primaryKeys, field.DBName)
 | 
								primaryKeys = append(primaryKeys, scope.Quote(field.DBName))
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		scope.createJoinTable(field)
 | 
							scope.createJoinTable(field)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user