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
This commit is contained in:
Arkadiusz Bokowy 2017-04-04 08:29:33 +02:00
parent 9f974b8996
commit bc93ed027f
1 changed files with 3 additions and 1 deletions

View File

@ -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"