Skip to content

Commit

Permalink
fix constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Solender committed Oct 22, 2021
1 parent f14e277 commit 9f603a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/gogmcli/gogm.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func main() {
app := &cli.App{
Name: "gogmcli",
HelpName: "gogmcli",
Version: "2.0.0",
Version: "2.1.0",
Usage: "used for neo4j operations from gogm schema",
Description: "cli for generating and executing migrations with gogm",
EnableBashCompletion: true,
Expand Down
4 changes: 2 additions & 2 deletions index_v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func createAllIndexesAndConstraintsV4(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 @@ -199,7 +199,7 @@ func createAllIndexesAndConstraintsV4(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 9f603a6

Please sign in to comment.