From a189c28af331cd8f3e117fc996a42aa7528b1f58 Mon Sep 17 00:00:00 2001 From: James Elliott Date: Thu, 19 Dec 2019 12:36:04 +1100 Subject: [PATCH] Fix PostgreSQL Update Second Factor Method Pref - column name is second_factor_method, not method --- internal/storage/postgres_provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/storage/postgres_provider.go b/internal/storage/postgres_provider.go index f1b62e0d1..3882250de 100644 --- a/internal/storage/postgres_provider.go +++ b/internal/storage/postgres_provider.go @@ -52,7 +52,7 @@ func NewPostgreSQLProvider(configuration schema.PostgreSQLStorageConfiguration) provider := PostgreSQLProvider{ SQLProvider{ sqlGetPreferencesByUsername: fmt.Sprintf("SELECT second_factor_method FROM %s WHERE username=$1", preferencesTableName), - sqlUpsertSecondFactorPreference: fmt.Sprintf("INSERT INTO %s (username, second_factor_method) VALUES ($1, $2) ON CONFLICT (username) DO UPDATE SET method=$2", preferencesTableName), + sqlUpsertSecondFactorPreference: fmt.Sprintf("INSERT INTO %s (username, second_factor_method) VALUES ($1, $2) ON CONFLICT (username) DO UPDATE SET second_factor_method=$2", preferencesTableName), sqlTestIdentityVerificationTokenExistence: fmt.Sprintf("SELECT EXISTS (SELECT * FROM %s WHERE token=$1)", identityVerificationTokensTableName), sqlInsertIdentityVerificationToken: fmt.Sprintf("INSERT INTO %s (token) VALUES ($1)", identityVerificationTokensTableName),