fix(migrator/migrator.go):remove var sql
This commit is contained in:
		
							parent
							
								
									441dc26e43
								
							
						
					
					
						commit
						10525fd0e2
					
				@ -156,8 +156,7 @@ func (m Migrator) AutoMigrate(values ...interface{}) error {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (m Migrator) GetTables() (tableList []string, err error) {
 | 
					func (m Migrator) GetTables() (tableList []string, err error) {
 | 
				
			||||||
	sql := "SELECT TABLE_NAME FROM information_schema.tables where TABLE_SCHEMA=?"
 | 
						return tableList, m.DB.Raw("SELECT TABLE_NAME FROM information_schema.tables where TABLE_SCHEMA=?", m.CurrentDatabase()).Scan(&tableList).Error
 | 
				
			||||||
	return tableList, m.DB.Raw(sql, m.CurrentDatabase()).Scan(&tableList).Error
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (m Migrator) CreateTable(values ...interface{}) error {
 | 
					func (m Migrator) CreateTable(values ...interface{}) error {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user