graphql-engine/cli/commands
Aravind c258fa75cb
cli: add --goto flag in hasura migrate apply (close #2689) (#3715)
* cli: add --goto <version> flag to migrate command

* cli: fix error encoutered in goto, when on version -1

* do down migrations one step down

* reorganize code

* in case of up "gotos" make sure that all previous migration in migration chain are applied

* modify readUp and readDown functions to account for --goto use case

* refactor to clean up and adopt a better implementation addressing the comments

* remove empty error handling step

* return ErrNoChange when no migrations were applied

* respect m.stop() can panic so place conditional cases after that and add a couple other small fixes

* fix bug caused by early checking of versions

* fix to add migration_mode and nil version check

* add some more examples for migrate apply command

Co-authored-by: Aravind Shankar <face11301@gmail.com>
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-02-03 12:33:32 +05:30
..
completion.go fix bash completion example docs on cli (#1832) 2019-03-28 07:28:20 +05:30
console_test.go optimise migrate api for console on cli (#2895) 2019-09-18 11:06:16 +05:30
console.go fix various version-related issues with cli (close #3706) (#3709) 2020-01-16 09:23:18 +05:30
docs.go cli: add new install script, commands (#1556) 2019-02-05 18:21:21 +05:30
help.go cli: add new install script, commands (#1556) 2019-02-05 18:21:21 +05:30
init_test.go rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30
init.go cli: add directory name as an argument to init cmd (#3590) 2019-12-25 14:01:29 +05:30
metadata_apply_test.go accept a json or yaml file for metadata apply command (close #1698) (#1746) 2019-03-20 10:40:06 +05:30
metadata_apply.go add examples to all cli commands (#3475) (#3492) 2019-12-12 10:46:36 +05:30
metadata_clear_test.go rename metadata reset to metadta clear (close #1851) (#1893) 2019-03-29 10:44:56 +05:30
metadata_clear.go add examples to all cli commands (#3475) (#3492) 2019-12-12 10:46:36 +05:30
metadata_diff_test.go cli(metadata): add diff command and dry-run flag (#3157) 2019-10-30 19:24:22 +05:30
metadata_diff.go export metadata without nulls, empty arrays & default values (#3393) 2019-12-14 00:47:38 -06:00
metadata_export_test.go accept a json or yaml file for metadata apply command (close #1698) (#1746) 2019-03-20 10:40:06 +05:30
metadata_export.go add examples to all cli commands (#3475) (#3492) 2019-12-12 10:46:36 +05:30
metadata_inconsistency_drop_test.go cli: add commands to manage inconsistent metadata (close #2766) (#2973) 2019-12-25 14:03:06 +05:30
metadata_inconsistency_drop.go cli: add commands to manage inconsistent metadata (close #2766) (#2973) 2019-12-25 14:03:06 +05:30
metadata_inconsistency_list.go cli: add commands to manage inconsistent metadata (close #2766) (#2973) 2019-12-25 14:03:06 +05:30
metadata_inconsistency_status.go cli: add commands to manage inconsistent metadata (close #2766) (#2973) 2019-12-25 14:03:06 +05:30
metadata_inconsistency.go cli: add commands to manage inconsistent metadata (close #2766) (#2973) 2019-12-25 14:03:06 +05:30
metadata_reload_test.go accept a json or yaml file for metadata apply command (close #1698) (#1746) 2019-03-20 10:40:06 +05:30
metadata_reload.go add examples to all cli commands (#3475) (#3492) 2019-12-12 10:46:36 +05:30
metadata.go cli: add commands to manage inconsistent metadata (close #2766) (#2973) 2019-12-25 14:03:06 +05:30
migrate_apply_test.go added feedback on migration commands (close #1410) (#1931) 2019-04-03 16:59:58 +05:30
migrate_apply.go cli: add --goto flag in hasura migrate apply (close #2689) (#3715) 2020-02-03 12:33:32 +05:30
migrate_create_test.go added feedback on migration commands (close #1410) (#1931) 2019-04-03 16:59:58 +05:30
migrate_create.go export metadata without nulls, empty arrays & default values (#3393) 2019-12-14 00:47:38 -06:00
migrate_squash.go add examples to all cli commands (#3475) (#3492) 2019-12-12 10:46:36 +05:30
migrate_status_test.go rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30
migrate_status.go add examples to all cli commands (#3475) (#3492) 2019-12-12 10:46:36 +05:30
migrate_test.go cli: add browser flag to console command (close #3333) (#3601) 2020-01-08 08:36:09 +05:30
migrate.go cli: add --goto flag in hasura migrate apply (close #2689) (#3715) 2020-02-03 12:33:32 +05:30
root.go cli: add directory name as an argument to init cmd (#3590) 2019-12-25 14:01:29 +05:30
update-cli.go fix various version-related issues with cli (close #3706) (#3709) 2020-01-16 09:23:18 +05:30
version.go rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30