Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On db migration, migrations files are auto deleted v2.33.1 #9861

Open
JumBay opened this issue Sep 1, 2023 · 4 comments
Open

On db migration, migrations files are auto deleted v2.33.1 #9861

JumBay opened this issue Sep 1, 2023 · 4 comments
Labels
k/bug Something isn't working

Comments

@JumBay
Copy link

JumBay commented Sep 1, 2023

Version Information

Server Version: 2.33.1
CLI Version (for CLI related issue):

Environment

Macos 13.5.1 (22G90)

What is the current behaviour?

When I do a migration (modifying my database or adding permission), the migrations files are created and then immediately removed as you can see on the video.

I switched back to hasura 2.27.0 (cli and docker) and I don't have the issue anymore. I add issue on 2.32.1 too

Screenshots or Screencast

Screen.Recording.2023-09-01.at.23.21.08.mov

Please provide any traces or logs that could help here.

Any possible solutions/workarounds you're aware of?

Keywords

@JumBay JumBay added the k/bug Something isn't working label Sep 1, 2023
@edmundmunday
Copy link

This seems to be related to the issue people are experiencing here: https://discord.com/channels/407792526867693568/1146076819301355591

@lazakrisz
Copy link

I had a very similar issue with Hasura CLI version 2.32.1 and I have posted my findings in the following issue:#9862 (comment)

Could you please check your metadata status?

What happened in my case is that my metadata status was in an inconsistent state due to trackable functions not being tracked (highlighted in the linked issue) and whenever I did something through the console (created a table, updated a field, made some metadata changes: update an action, event handler etc...) nothing was visible

On the console I started querying the console for my migration status and it kept returning with the following strange migrations:
image
It had a timestamp but it essentially had a - where the name of the migration should have been, it also was not present on my disk nor in the docker container, only the DB. I suspect this could be due to the fact that the engine was not able to generate the metadata because it was already in an inconsistent state?

@venelin-zek
Copy link

For anyone experiencing the issue and thinking how to fix it, you can downgrade the hasura-cli:

hasura update-cli --version 2.32.0

@rikinsk
Copy link
Member

rikinsk commented Sep 5, 2023

Folks, patches for v2.32 and v2.33 have been released with fixes for this. You will just need to update the CLI for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants