From 53c1b645eeaaa5213a500b6e1ec58da0e081f386 Mon Sep 17 00:00:00 2001 From: James Elliott Date: Mon, 24 Oct 2022 06:09:38 +1100 Subject: [PATCH] fix(storage): postgresql default port incorrect (#4251) This fixes a typo with the default port for PostgreSQL in 4.37. Fixes #4249 --- .../migrations/V0006.ConsentPreConfiguration.mysql.up.sql | 2 +- .../migrations/V0006.ConsentPreConfiguration.postgres.up.sql | 2 +- .../migrations/V0006.ConsentPreConfiguration.sqlite.up.sql | 2 +- internal/storage/sql_provider_backend_postgres.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/storage/migrations/V0006.ConsentPreConfiguration.mysql.up.sql b/internal/storage/migrations/V0006.ConsentPreConfiguration.mysql.up.sql index 693b0ed91..a74a42fb9 100644 --- a/internal/storage/migrations/V0006.ConsentPreConfiguration.mysql.up.sql +++ b/internal/storage/migrations/V0006.ConsentPreConfiguration.mysql.up.sql @@ -8,7 +8,7 @@ CREATE TABLE oauth2_consent_preconfiguration ( scopes TEXT NOT NULL, audience TEXT NULL, PRIMARY KEY (id), - CONSTRAINT oauth2_consent_preconfiguration_subjct_fkey + CONSTRAINT oauth2_consent_preconfiguration_subject_fkey FOREIGN KEY(subject) REFERENCES user_opaque_identifier(identifier) ON UPDATE RESTRICT ON DELETE RESTRICT ); diff --git a/internal/storage/migrations/V0006.ConsentPreConfiguration.postgres.up.sql b/internal/storage/migrations/V0006.ConsentPreConfiguration.postgres.up.sql index 71a98616f..964ddd3d9 100644 --- a/internal/storage/migrations/V0006.ConsentPreConfiguration.postgres.up.sql +++ b/internal/storage/migrations/V0006.ConsentPreConfiguration.postgres.up.sql @@ -8,7 +8,7 @@ CREATE TABLE oauth2_consent_preconfiguration ( scopes TEXT NOT NULL, audience TEXT NULL, PRIMARY KEY (id), - CONSTRAINT oauth2_consent_preconfiguration_subjct_fkey + CONSTRAINT oauth2_consent_preconfiguration_subject_fkey FOREIGN KEY(subject) REFERENCES user_opaque_identifier(identifier) ON UPDATE RESTRICT ON DELETE RESTRICT ); diff --git a/internal/storage/migrations/V0006.ConsentPreConfiguration.sqlite.up.sql b/internal/storage/migrations/V0006.ConsentPreConfiguration.sqlite.up.sql index a491e82df..3f1bccef3 100644 --- a/internal/storage/migrations/V0006.ConsentPreConfiguration.sqlite.up.sql +++ b/internal/storage/migrations/V0006.ConsentPreConfiguration.sqlite.up.sql @@ -8,7 +8,7 @@ CREATE TABLE oauth2_consent_preconfiguration ( scopes TEXT NOT NULL, audience TEXT NULL, PRIMARY KEY (id), - CONSTRAINT oauth2_consent_preconfiguration_subjct_fkey + CONSTRAINT oauth2_consent_preconfiguration_subject_fkey FOREIGN KEY(subject) REFERENCES user_opaque_identifier(identifier) ON UPDATE RESTRICT ON DELETE RESTRICT ); diff --git a/internal/storage/sql_provider_backend_postgres.go b/internal/storage/sql_provider_backend_postgres.go index 19a14f351..e8834db44 100644 --- a/internal/storage/sql_provider_backend_postgres.go +++ b/internal/storage/sql_provider_backend_postgres.go @@ -148,7 +148,7 @@ func dsnPostgreSQL(config *schema.PostgreSQLStorageConfiguration, globalCACertPo } if dsnConfig.Port == 0 && !path.IsAbs(dsnConfig.Host) { - dsnConfig.Port = 4321 + dsnConfig.Port = 5432 } return stdlib.RegisterConnConfig(dsnConfig)