How to run a down migration file? #3189
Unanswered
RyanMannix
asked this question in
Q&A
Replies: 1 comment
-
Hey @RyanMannix |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TL:DR - I think I need to apply a kratos down migration file.
I have a kratos server, deployed via helm. It has been working fine.
I needed to make a small addition to the values.yaml file.
helm uninstall kratos
helm upgrade --install kratos ory/kratos -f values.yaml -n ory
The pod wouldn't stand up, logged "waiting for migrations to finish" or something similar.
Switched my
automigrate
value from false totrue
Re-ran the command, and everything appeared to work fine.
However, something was removed from the newest version of kratos which our apps are using, specifically a cookie header.
So, I restarted the process targeting a specific version of kratos.
helm uninstall kratos
helm upgrade --install kratos ory/kratos --version 0.26.6 -f values.yaml -n ory
(kratos version 0.10.1, the version listed is the helm chart version)Great, everything appeared to be working.
However, some things are broken - password reset, and signing in with google works differently now.
Have since revered everything I changed in the yaml file (including the automigrate: true), kept the new addition of the kratos version target in the helm install. Still some functionality doesn't work.
The only thing I can think of is that the migrations file was applied, made some changes in our db, and now we are trying to use a version of kratos expecting postgres to be at migration_00n at it's at migration_00n+1.
Hopefully this makes sense. If you recognize the malfunctions and think I'm barking up the wrong tree, let me know. Otherwise, if anyone knows how to identify which down files need to be run and how to run them, let me know.
Thanks very much
Beta Was this translation helpful? Give feedback.
All reactions