changed sqlite to postgresql

This commit is contained in:
Dominic Renner
2019-03-06 10:59:52 +01:00
parent 8c2cb26fd7
commit 6547a2ce1f
5 changed files with 14 additions and 13 deletions

View File

@ -19,7 +19,7 @@ package database
import (
"database/sql"
_ "github.com/mattn/go-sqlite3"
_ "github.com/lib/pq"
log "maunium.net/go/maulogger/v2"
)
@ -35,7 +35,8 @@ type Database struct {
}
func New(file string) (*Database, error) {
conn, err := sql.Open("sqlite3", file)
connStr := "postgres://synapse:changeme@db/whatsapp?sslmode=disable"
conn, err := sql.Open("postgres", connStr)
if err != nil {
return nil, err
}