Migrate to PostgreSQL and fix related issues
This commit is contained in:
parent
0b8fbea6c3
commit
a89a9776c3
17 changed files with 176 additions and 174 deletions
|
|
@ -2,7 +2,7 @@ package helpers
|
|||
|
||||
import (
|
||||
"git.readonly.ch/bouzoure/pop-camarades/models"
|
||||
"github.com/glebarez/sqlite"
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/gorm"
|
||||
gormLogger "gorm.io/gorm/logger"
|
||||
)
|
||||
|
|
@ -30,7 +30,7 @@ func GetDatabase() (*gorm.DB, error) {
|
|||
}
|
||||
|
||||
database, err = gorm.Open(
|
||||
sqlite.Open(config.Database.Location),
|
||||
postgres.Open(config.Database.DSN),
|
||||
&gormConfig,
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue