test: enabled mysql& mssql for ErrForeignKeyViolate

This commit is contained in:
Saeid Saeidee 2023-06-13 09:20:40 +02:00
parent c1ac0682fb
commit adcbf9f68b
2 changed files with 2 additions and 3 deletions

View File

@ -77,7 +77,7 @@ func TestSupportedDialectorWithErrForeignKeyViolated(t *testing.T) {
t.Fatalf("failed to connect database, got error %v", err)
}
dialectors := map[string]bool{"sqlite": true, "postgres": true, "mysql": false, "sqlserver": false}
dialectors := map[string]bool{"sqlite": true, "postgres": true, "mysql": true, "sqlserver": true}
if supported, found := dialectors[db.Dialector.Name()]; !(found && supported) {
return
}

View File

@ -7,8 +7,7 @@ require (
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jinzhu/now v1.1.5
github.com/lib/pq v1.10.9
github.com/mattn/go-sqlite3 v1.14.16 // indirect
gorm.io/driver/mysql v1.5.0
gorm.io/driver/mysql v1.5.2-0.20230612053416-48b6526a21f0
gorm.io/driver/postgres v1.5.3-0.20230607070428-18bc84b75196
gorm.io/driver/sqlite v1.5.2
gorm.io/driver/sqlserver v1.5.1