Merge pull request #426 from willglynn/composite_unique_indexes
Fix creation of composite unique indexes
This commit is contained in:
		
						commit
						17b20bcdd8
					
				@ -570,7 +570,7 @@ func (scope *Scope) autoIndex() *Scope {
 | 
				
			|||||||
			if name == "UNIQUE_INDEX" {
 | 
								if name == "UNIQUE_INDEX" {
 | 
				
			||||||
				name = fmt.Sprintf("uix_%v_%v", scope.TableName(), field.DBName)
 | 
									name = fmt.Sprintf("uix_%v_%v", scope.TableName(), field.DBName)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			uniqueIndexes[name] = append(indexes[name], field.DBName)
 | 
								uniqueIndexes[name] = append(uniqueIndexes[name], field.DBName)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user