package storage

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

func InitDB(databaseURL string) (*sql.DB, error) {
	db, err := sql.Open("postgres", databaseURL)
	if err != nil {
		return db, err
	}
	Migrate(db)
	return db, err
}
