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.

Add a `migration_mode` flag to the `console` CLI options

See original GitHub issue

When using the cli console to modify your metadata, you can turn off migration_mode with a little toggle switch. This is great for when you are managing your own schema and don’t want hasura to touch anything except its own metadata.

The trouble is that this little toggle is stateful, so if you’re running out of docker, you have to remember to flip that switch each time you spin up a container.

It’d be great to just have a flag you can pass:

hasura console --migration-mode false

or

hasura console --no-migrations

The work around at the moment is to either:

  • use curl (or similar) to mimic the API call that does this:
curl -H 'Content-Type: application/json' -X PUT -d '{"name": "migration_mode", "value": "false"}' http://0.0.0.0:9693/apis/migrate/settings
  • execute some SQL when you spin up your postgres container:
CREATE TABLE IF NOT EXISTS hdb_catalog.migration_settings (setting text not null primary key, value text not null);

INSERT INTO hdb_catalog.migration_settings (setting, value) VALUES ('migration_mode', 'false') ON CONFLICT ON CONSTRAINT migration_settings_pkey 

DO NOTHING;

(Thank you to the awesome support team, and especially @shahidhk for the required SQL.)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marionschleifercommented, Aug 12, 2019

@KCErb you are totally right. I missed this. Removing it. Thanks for letting me know 🙂

0reactions
KCErbcommented, Aug 12, 2019

Hi @marionschleifer I noticed you added the help wanted label to this issue. What help is needed? Last I heard on the PR (2321) this was waiting on internal review. Is that wrong?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command line options - AWS Documentation
In the AWS CLI, command line options are global parameters you can use to override the default configuration settings, any corresponding profile setting, ......
Read more >
List of Chromium Command Line Switches - Peter Beverloo
This flag can reduce the security of the sandboxed processes and allow them to do certain API calls like shut down Windows or...
Read more >
Command-line syntax overview for System.CommandLine
An introduction to the command-line syntax that the System.CommandLine library recognizes by default. Mentions exceptions where syntax in ...
Read more >
Cisco NDFC Fabric Controller Configuration Guide, Release ...
Ability to run the show commands including show run, show interfaces, etc. ... Nexus Dashboard Fabric Controller moves this device to a migration...
Read more >
NDVRBOOK in Migration Mode - TechDocs
The OPTION command instructs the Change Monitor to go into migration mode. All ADD and MODIFY actions made by the program executed in...
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