Create user without confilct
This commit is contained in:
		
							parent
							
								
									77f15a197a
								
							
						
					
					
						commit
						f28b5188a6
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -274,6 +274,8 @@ func (db *T) CreateUser(username, password, name string) (userID int64, err erro | |||
| 			), | ||||
| 			$3 | ||||
| 		) | ||||
| 		ON CONFLICT (username) DO UPDATE | ||||
| 		SET username = EXCLUDED.username | ||||
| 		RETURNING id | ||||
| 		`, | ||||
| 		username, | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue