You've already forked focalboard
							
							
				mirror of
				https://github.com/mattermost/focalboard.git
				synced 2025-10-31 00:17:42 +02:00 
			
		
		
		
	Add table_schema filter when checking for migrations table shape (#4717)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							7fd923b213
						
					
				
				
					commit
					acc9750d97
				
			| @@ -123,6 +123,13 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) { | ||||
| 			"TABLE_NAME": s.tablePrefix + "schema_migrations", | ||||
| 		}) | ||||
|  | ||||
| 	switch s.dbType { | ||||
| 	case model.MysqlDBType: | ||||
| 		query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName}) | ||||
| 	case model.PostgresDBType: | ||||
| 		query = query.Where("table_schema = current_schema()") | ||||
| 	} | ||||
|  | ||||
| 	rows, err := query.Query() | ||||
| 	if err != nil { | ||||
| 		s.logger.Error("failed to fetch columns in schema_migrations table", mlog.Err(err)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user