We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 775421e commit c833d0fCopy full SHA for c833d0f
models/unittest/fixtures_loader.go
@@ -31,6 +31,7 @@ func (f *fixturesLoader) prepareFieldValue(v any) any {
31
}
32
return v
33
34
+
35
func (f *fixturesLoader) loadFixtures(file string) error {
36
data, err := os.ReadFile(file)
37
if err != nil {
@@ -51,9 +52,9 @@ func (f *fixturesLoader) loadFixtures(file string) error {
51
52
53
switch f.engine.Dialect().URI().DBType {
54
case schemas.MSSQL:
- _, _ = f.engine.Exec("SET IDENTITY_INSERT [%s] ON", tableName)
55
+ _, _ = f.engine.Exec(fmt.Sprintf("SET IDENTITY_INSERT `%s` ON", tableName))
56
defer func() {
- _, _ = f.engine.Exec("SET IDENTITY_INSERT [%s] OFF", tableName)
57
+ _, _ = f.engine.Exec(fmt.Sprintf("SET IDENTITY_INSERT `%s` OFF", tableName))
58
}()
59
60
0 commit comments