Skip to content

Commit

Permalink
fix constraints in v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Solender committed Oct 22, 2021
1 parent 9f603a6 commit ac5fcca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func createAllIndexesAndConstraintsV3(ctx context.Context, gogm *Gogm, mappedTyp
Name: node,
Type: structConfig.Label,
Field: config.Name,
})).ToCypher()
})).Cypher("IF NOT EXISTS").ToCypher()
if err != nil {
return err
}
Expand All @@ -180,7 +180,7 @@ func createAllIndexesAndConstraintsV3(ctx context.Context, gogm *Gogm, mappedTyp
cyp, err := dsl.QB().Create(dsl.NewIndex(&dsl.IndexConfig{
Type: structConfig.Label,
Fields: indexFields,
})).ToCypher()
})).Cypher("IF NOT EXISTS").ToCypher()
if err != nil {
return err
}
Expand Down

0 comments on commit ac5fcca

Please sign in to comment.