Add postgres support #135

Merged
konrad merged 26 commits from jtojnar/api:pgsql into master 2020-02-16 21:42:05 +00:00
1 changed files with 3 additions and 15 deletions
Showing only changes of commit 01852631fb - Show all commits

View File

@ -51,27 +51,15 @@ func InitFixtures(tablenames ...string) (err error) {
testfiles,
}
if config.DatabaseType.GetString() == "postgres" {
loaderOptions = append(loaderOptions, testfixtures.SkipResetSequences())
}
// if config.DatabaseType.GetString() == "postgres" {
// loaderOptions = append(loaderOptions, testfixtures.SkipResetSequences())
// }
fixtures, err = testfixtures.New(loaderOptions...)
if err != nil {
return err
}
// var helper testfixtures.Helper = &testfixtures.SQLite{}
// if config.DatabaseType.GetString() == "mysql" {
// helper = &testfixtures.MySQL{}
// } else if config.DatabaseType.GetString() == "postgres" {
// helper = &testfixtures.PostgreSQL{
// // This prevents issues with entries that already exist in the db
// SkipResetSequences: true,
// }
// }
//
// testfixtures.SkipDatabaseNameCheck(true)
return err
}