Project

General

Profile

Actions

Bug #29453

open

Migration rollback fails

Added by Ondřej Ezr about 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

We can't revert migrations, we should set this standard in our code, even though it's more important for plugins

Actions #1

Updated by Marek Hulán about 4 years ago

While I agree we should try, there are simply cases where the migration was impossible to revert, simply because the data no longer exist. I don't recall a time we'd actually need to rollback in core, but I agree this should be standard for plugin maintainers in case users want to uninstall the plugin.

Actions #2

Updated by Ondřej Ezr about 4 years ago

Now, the reverts are failing for wrong usage of `up` vs `change` usually. The goal is not a time travel and revive historical data, but make the foreman able to downgrade version or two and still be usable.
It's common that, data migrations have only `up` method :)

Actions

Also available in: Atom PDF