Merge pull request #1 from wclssdn/add_autoIncrement_implement
Update migrator.go
This commit is contained in:
		
						commit
						7cf0819f93
					
				@ -73,6 +73,10 @@ func (m Migrator) FullDataTypeOf(field *schema.Field) (expr clause.Expr) {
 | 
				
			|||||||
		expr.SQL += " NOT NULL"
 | 
							expr.SQL += " NOT NULL"
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if field.AutoIncrement {
 | 
				
			||||||
 | 
							expr.SQL += " AUTO_INCREMENT"
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if field.Unique {
 | 
						if field.Unique {
 | 
				
			||||||
		expr.SQL += " UNIQUE"
 | 
							expr.SQL += " UNIQUE"
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user