mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-11-10 10:29:12 +03:00
cli: fix cli-console failing to add migrations if there are tabs in SQL body
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2822 Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com> GitOrigin-RevId: 1036a177e81a24ac4d047b56aead42d297682c14
This commit is contained in:
parent
691b9233ce
commit
7d26e86fa1
@ -6,6 +6,7 @@
|
||||
- server: fix to allow remote schema response to contain an "extensions" field (#7143)
|
||||
- console: add comments to tracked functions
|
||||
- metadata SDK: add type definitions for config v3
|
||||
- cli: fix cli-console failing to add migrations if there are tabs in SQL body (#7362)
|
||||
|
||||
- cli: core CLI features are not blocked in environments without internet (#7695)
|
||||
|
||||
|
@ -2,6 +2,7 @@ package hasuradb
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@ -20,7 +21,6 @@ import (
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
"github.com/goccy/go-yaml"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate/database"
|
||||
"github.com/parnurzeal/gorequest"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@ -269,7 +269,7 @@ func (h *HasuraDB) Run(migration io.Reader, fileType, fileName string) error {
|
||||
}
|
||||
case "meta":
|
||||
var metadataRequests []interface{}
|
||||
err := yaml.Unmarshal(migr, &metadataRequests)
|
||||
err := json.Unmarshal(migr, &metadataRequests)
|
||||
if err != nil {
|
||||
h.migrationQuery.ResetArgs()
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user