From bc93ed027fc9c0889a613dc4e4b683e6dd66c14c Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Tue, 4 Apr 2017 08:29:33 +0200 Subject: [PATCH] Support for alternative postgres URI scheme According to the PostgreSQL documentation (section 32.1.1.2), postgres library supports two URI schemes: postgresql:// and postgres:// Reference: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING --- database/postgres/postgres.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/database/postgres/postgres.go b/database/postgres/postgres.go index 84f8c86..3358b4a 100644 --- a/database/postgres/postgres.go +++ b/database/postgres/postgres.go @@ -13,7 +13,9 @@ import ( ) func init() { - database.Register("postgres", &Postgres{}) + db := Postgres{} + database.Register("postgres", &db) + database.Register("postgresql", &db) } var DefaultMigrationsTable = "schema_migrations"