Storyblok CLI - Migrations rollbacks process is unclear #315
Closed
edvinasjurele
started this conversation in
General
Replies: 2 comments 2 replies
-
|
Hey @edvinasjurele I agree this is an undesirable behavior from the migrations optimization. I agree that their should be a rollback file per run, thanks for raising this let me transform it into a bug and prioritize it |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
@edvinasjurele you arrived earlier :D Closing as resolved in #318 |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After introducing stream-based migrations (#295), v4.6.3, it seems many rollback files are being created, which results in 1 story = 1 file (before it was 1 rollback file for 1 run), which by the way extremely complicates rollback process.
As documented https://github.com/storyblok/monoblok/blob/main/packages/cli/src/commands/migrations/rollback/README.md rollback command is targetting specific file BY FULL NAME:
which raises us questions of how to rollback the recently executed migration run easily.
Moreover, if I we have 2 migrations for same block, f.e.:
this results in essentially duplicated stories which seems are identical:
I’m not entirely sure how the process is intended to work. Could you guide us through the steps to go from point A to B and back to A, especially in scenarios involving multiple stories (i.e., handling multiple files)?
Perhaps it would make sense to combine rollbacks into a single file instead of generating multiple files. For instance, in our space of 12k stories, if we run a migration for 7k files, we’ll end up with 7k rollback files, which makes rolling back nearly impossible in such cases.
Perhaps the migration command should be improved to target a block, similar to how the migration run works, rather than targeting a specific file. Handling individual files feels tedious and non-revertable. Ultimately, this comes down to the vision or process that you, as the creators of the CLI, want to define and enforce.
Beta Was this translation helpful? Give feedback.
All reactions