mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 23:22:25 -06:00 
			
		
		
		
	[bugfix] Fix update users query in migration
This commit is contained in:
		
					parent
					
						
							
								b0873972ec
							
						
					
				
			
			
				commit
				
					
						ca472f1383
					
				
			
		
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -81,12 +81,13 @@ func init() {
 | 
			
		|||
				return err
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Set instance app
 | 
			
		||||
			// ID on all users.
 | 
			
		||||
			// Set instance app ID on
 | 
			
		||||
			// users where it's null.
 | 
			
		||||
			if _, err := tx.
 | 
			
		||||
				NewUpdate().
 | 
			
		||||
				Table("users").
 | 
			
		||||
				Set("? = ?", bun.Ident("created_by_application_id"), instanceAppID).
 | 
			
		||||
				Where("? IS NULL", bun.Ident("created_by_application_id")).
 | 
			
		||||
				Exec(ctx); err != nil {
 | 
			
		||||
				return err
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue