I've started to play around with content migrations and have been following the Craft Quest course on the subject.
I'm not sure if this is a situation you should ever find yourself in, in an ideal work flow, but just encase its worth asking.
I created some generic content migration files which were flawed. I could spin them up using migrate/up
but was unable to remove them with migrate/down
- I then realised it was because of an error with the previous migration content file.
So I was left with no way to remove these fields, so I deleted them in Craft (I know not very elegant) and decided to start fresh. I also deleted the files from the migrations folder (this might have been a mistake - and not recommended as a workflow).
But these files are still referenced in Utilities > Content Migration
So... Is there another way to remove these files from Craft? This is just dummy data but I'm interested as if it was real data then this could be an issue.
Would you delete these inputs from the Database directly? If so how?
Or, would you take the file names and re create them again in the migrations folder and write the correct spin/down function and run that? Or is there a command that can be issued in the migrate/down command that tells craft to invalidate this file.
Or, is there a way to get Craft to clear its cached to see these file no longer exist?
I did find this answer helpful, but in this use case it would boil down to revert to a prior DB import.
Thanks for any help offered here, I know it's a hypothetical but has a real use case for future debugging.