Skip to content

Commit

Permalink
cli: do not clear metadata during metadata apply (close hasura#6115) (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptonist authored and codingkarthik committed Nov 6, 2020
1 parent c83a758 commit ca07aaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The corresponding JWT config can be:
**NOTE:** If you have event triggers with names greater than 42 chars, then you should update their names to avoid running into Postgres identifier limit bug (#5786)
- server: fix issue with tracking custom functions that return `SETOF` materialized view (close #5294) (#5945)
- server: allow remote relationships with union, interface and enum type fields as well (fixes #5875) (#6080)
- cli: fix bug in metadata apply which made the server aquire some redundant and unnecessary locks (close #6115)

### Breaking change

Expand Down
15 changes: 3 additions & 12 deletions cli/migrate/database/hasuradb/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,9 @@ func (h *HasuraDB) ApplyMetadata() error {
if err != nil {
return err
}
query := HasuraInterfaceBulk{
Type: "bulk",
Args: []interface{}{
HasuraInterfaceQuery{
Type: "clear_metadata",
Args: HasuraArgs{},
},
HasuraInterfaceQuery{
Type: "replace_metadata",
Args: obj,
},
},
query := HasuraInterfaceQuery{
Type: "replace_metadata",
Args: obj,
}
resp, body, err := h.sendv1Query(query)
if err != nil {
Expand Down

0 comments on commit ca07aaf

Please sign in to comment.