Fix duplicate auto incremented IDs

Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
kolaente 2020-02-15 23:05:37 +01:00
parent d8f77b1d36
commit ae2dc57daa
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -34,7 +34,10 @@ func InitFixtures(tablenames ...string) (err error) {
if config.DatabaseType.GetString() == "mysql" {
helper = &testfixtures.MySQL{}
} else if config.DatabaseType.GetString() == "postgres" {
helper = &testfixtures.PostgreSQL{}
helper = &testfixtures.PostgreSQL{
// This prevents issues with entries that already exist in the db
SkipResetSequences: true,
}
}
dir := filepath.Join(config.ServiceRootpath.GetString(), "pkg", "db", "fixtures")