Ignore columns with defaults on Insert
This commit is contained in:
parent
a48e5f7f82
commit
813fd43e03
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ func test{{$tableNamePlural}}Delete(t *testing.T) {
|
||||||
seed := randomize.NewSeed()
|
seed := randomize.NewSeed()
|
||||||
var err error
|
var err error
|
||||||
{{$varNameSingular}} := &{{$tableNameSingular}}{}
|
{{$varNameSingular}} := &{{$tableNameSingular}}{}
|
||||||
if err = randomize.Struct(seed, {{$varNameSingular}}, {{$varNameSingular}}DBTypes, true); err != nil {
|
if err = randomize.Struct(seed, {{$varNameSingular}}, {{$varNameSingular}}DBTypes, true, {{$varNameSingular}}ColumnsWithDefault...); err != nil {
|
||||||
t.Errorf("Unable to randomize {{$tableNameSingular}} struct: %s", err)
|
t.Errorf("Unable to randomize {{$tableNameSingular}} struct: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ func test{{$tableNamePlural}}QueryDeleteAll(t *testing.T) {
|
||||||
seed := randomize.NewSeed()
|
seed := randomize.NewSeed()
|
||||||
var err error
|
var err error
|
||||||
{{$varNameSingular}} := &{{$tableNameSingular}}{}
|
{{$varNameSingular}} := &{{$tableNameSingular}}{}
|
||||||
if err = randomize.Struct(seed, {{$varNameSingular}}, {{$varNameSingular}}DBTypes, true); err != nil {
|
if err = randomize.Struct(seed, {{$varNameSingular}}, {{$varNameSingular}}DBTypes, true, {{$varNameSingular}}ColumnsWithDefault...); err != nil {
|
||||||
t.Errorf("Unable to randomize {{$tableNameSingular}} struct: %s", err)
|
t.Errorf("Unable to randomize {{$tableNameSingular}} struct: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ func test{{$tableNamePlural}}SliceDeleteAll(t *testing.T) {
|
||||||
seed := randomize.NewSeed()
|
seed := randomize.NewSeed()
|
||||||
var err error
|
var err error
|
||||||
{{$varNameSingular}} := &{{$tableNameSingular}}{}
|
{{$varNameSingular}} := &{{$tableNameSingular}}{}
|
||||||
if err = randomize.Struct(seed, {{$varNameSingular}}, {{$varNameSingular}}DBTypes, true); err != nil {
|
if err = randomize.Struct(seed, {{$varNameSingular}}, {{$varNameSingular}}DBTypes, true, {{$varNameSingular}}ColumnsWithDefault...); err != nil {
|
||||||
t.Errorf("Unable to randomize {{$tableNameSingular}} struct: %s", err)
|
t.Errorf("Unable to randomize {{$tableNameSingular}} struct: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue