lib / pq

Pure Go Postgres driver for database/sql
https://pkg.go.dev/github.com/lib/pq
MIT License
9.04k stars 909 forks source link

Database Driver #1024

Open ArtiomOganesyan opened 3 years ago

ArtiomOganesyan commented 3 years ago

while using golang-migrate command migrate -path migrations/ -database "postgres://localhost/shopping_list?sslmode=disable" up returns error error: database driver: unknown driver postgres (forgotten import?) As I understand lib/pq provides the drivers for the postgres or am I mistaken?

philipglazman commented 3 years ago

Did you remember to import pq as a side effect import?

import ( _ "github.com/lib/pq")