question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot Create Migration

See original GitHub issue

Versions:

  • Hasura GraphQL version: v1.0.0-beta.2 using docker

  • CLI Version: v1.0.0-beta.2

  • OS Windwos 10

Steps to reproduce:

  • Set console to false

  • Launch console with hasura.exe console worked and no errors or warning found.

  • I’ve migrated several times before, using CLI with the command hasura.exe migrate create "migrate_name" --from-server and generated both .yaml and .sql file.

  • I’ve tried migration again after some addition and changes it’s getting failed with reason:

cannot fetch schema dump: invalid character '<' looking for beginning of value

with the result only generated .yaml file. I don’t know what changes have caused this situation because there are too many additions and changes made and so far no errors have been found when the client making the request (query, mutation even sub). So I assume it’s work perfectly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hynracommented, Aug 14, 2019

I solved this issue by running migration on the remote server and exclude caddy from docker-compose.yaml. We running Hasura on an existing database with a monolith architecture, we have like 80+ tables and thousands of data. When I run a manual migration, It’s like take sometimes that Caddy rules cannot handle that (timeout or something).

This is my docker-compose based on Hasura doc in previous version:

version: '3.6'
services:
  postgres:
    image: postgres:10.5
    restart: always
    volumes:
    - db_data:/var/lib/postgresql/data
  graphql-engine:
    image: hasura/graphql-engine:v1.0.0-beta.4
    depends_on:
    - "postgres"
    restart: always
    environment: 
      HASURA_GRAPHQL_DATABASE_URL: postgresql://postgres:blah
      # enable the console served by server
      HASURA_GRAPHQL_ENABLE_CONSOLE: "false" # set "false" to disable console
      ## uncomment next line to set an admin secret key
      # this is comment
      HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
      HASURA_GRAPHQL_ADMIN_SECRET: adminsecret
    command:
    - graphql-engine 
    - serve
  caddy:
    image: abiosoft/caddy:0.11.0
    depends_on:
    - "graphql-engine"
    restart: always
    ports:
    - "80:80"
    - "443:443"
    volumes:
    - ./Caddyfile:/etc/Caddyfile
    - caddy_certs:/root/.caddy
volumes:
  db_data:
  caddy_certs:

So, I updated with v1.0.0-beta.4 and realized that in Install Manifest there is no Caddy anymore

version: '3.6'
services:
  postgres:
    image: postgres
    restart: always
    volumes:
    - db_data:/var/lib/postgresql/data
  graphql-engine:
    image: hasura/graphql-engine:v1.0.0-beta.4
    ports:
    - "8080:8080"
    depends_on:
    - "postgres"
    restart: always
    environment:
      HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:@postgres:5432/postgres
      HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
      HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
      ## uncomment next line to set an admin secret
      # HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
volumes:
  db_data:
0reactions
marionschleifercommented, Aug 14, 2019

Glad to see that this issue is resolved. I’m closing it 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

I cannot create migrations in ASP.NET Core. What is the ...
I want to create a table to create the migrations and connect with SQL Server 2014. But when I run add-migrations AddMusicStoreToDb.
Read more >
Error while Add-Migration "Initialize" in .NET 6 Entity Framework
While running Add-Migration needs to select the proper library containing dbcontext class for entity framework. 175769-ef-error.jpg. 0 Votes 0 ·.
Read more >
Error running Entity Framework 6 code first migration commands
In VS2017, when I try and run Entity Framework (6) code first commands such as update-database or add-migration, I get the following error:...
Read more >
Unable to start Plesk migration: bin/mkdir: cannot create ...
Plesk Migrator could not create required directory on the source server because migration was started not under root user. Resolution. Start a ...
Read more >
Migrations and Seed Data With Entity Framework Core
Your browser can't play this video. ... The migration process has two steps: Creating migration and Applying migration. As we already said, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found