-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
c/cliRelated to CLIRelated to CLIc/migrationsRelated to migrationsRelated to migrationsk/enhancementNew feature or improve an existing featureNew feature or improve an existing featuresupport/needs-triageNeeds to be triaged so that we have enough information to add this to our backlogNeeds to be triaged so that we have enough information to add this to our backlog
Description
Is your proposal related to a problem?
When first using Hasura, I often wished for a squash feature when working through migrations at development time. The addition of hasura migrate squash is excellent. However, I find that it's easy to make mistakes when using it. For example, if you don't remember to rollback before squashing, then you could cause metadata inconsistencies.
git status
# multiple migrations are ready to stage during development time and are already applied
hasura migrate squash
git status
# one migration is ready for staging now but i forget to hasura migrate apply --down 1 before I squashed
git add .
git commit -m "Add squashed migration and potentially inconsistent metadata"Describe the solution you'd like
The command would at least provide a way to tell it to rollback to the --from version before squashing:
hasura migrate squash --from [migration version] --rollback-firstTangentially related, what if there was a switch for including hasura metadata apply in migrate as well so I don't forget that?
hasura migrate apply --apply-metadata-afterDescribe alternatives you've considered
I could be fundamentally using squash incorrectly in the first place? 😅
If the feature is approved, would you be willing to submit a PR?
I don't know Haskell. 😬
Metadata
Metadata
Assignees
Labels
c/cliRelated to CLIRelated to CLIc/migrationsRelated to migrationsRelated to migrationsk/enhancementNew feature or improve an existing featureNew feature or improve an existing featuresupport/needs-triageNeeds to be triaged so that we have enough information to add this to our backlogNeeds to be triaged so that we have enough information to add this to our backlog