From f3cf0924336229de34d7075b77cbcbb4361c596f Mon Sep 17 00:00:00 2001 From: James Elliott Date: Thu, 19 Dec 2019 14:56:16 +1100 Subject: [PATCH] Fix second_factor_method creation length - mobile_push is 11 characters long, but db init sets it to 10. --- internal/storage/sql_provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/storage/sql_provider.go b/internal/storage/sql_provider.go index 83850133f..e86ab2405 100644 --- a/internal/storage/sql_provider.go +++ b/internal/storage/sql_provider.go @@ -34,7 +34,7 @@ type SQLProvider struct { func (p *SQLProvider) initialize(db *sql.DB) error { p.db = db - _, err := db.Exec(fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (username VARCHAR(100) PRIMARY KEY, second_factor_method VARCHAR(10))", preferencesTableName)) + _, err := db.Exec(fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (username VARCHAR(100) PRIMARY KEY, second_factor_method VARCHAR(11))", preferencesTableName)) if err != nil { return err }