Describe the bug
As an implementer, if I upgrade an old Decidim installation and I didn't execute the command for migrating from legacy decidim-surveys tables to decidim-forms tables, then I lost all my surveys data (!!!).
To Reproduce
Steps to reproduce the behavior:
- Starting with a legacy installation with data on decidim-surveys tables
- Execute the upgrade (decidim:upgrade / db:migrate)
- Go to see the decidim-surveys responses
- See that I lost my data
Expected behavior
To not have my data removed.
We should be extra careful when remove data and working with legacy tables.
One possible solution would be:
- Add a migration task that first check if there's content on decidim-surveys legacy tables. This should be executed before removing (of course)
- On that migration, it should be the code from decidim_surveys:migrate_data_to_decidim_forms task
- We should also remove the decidim_surveys:migrate_data_to_decidim_forms task as it doesn't make sense now
As an alternative, when executing the migration for deleting the data we should stop and make a warning if there's data on those tables.
Screenshots
If applicable, add screenshots to help explain your problem.
Stacktrace
If applicable, add the error stacktrace to help explain your problem.
Extra data (please complete the following information):
- Decidim Version: 0.23.dev and I'm not so sure if this also is on 0.22 (I didn't check it yet)
- Decidim installation: FundAction
Additional context
This comes from #6178
See comment.
Describe the bug
As an implementer, if I upgrade an old Decidim installation and I didn't execute the command for migrating from legacy decidim-surveys tables to decidim-forms tables, then I lost all my surveys data (!!!).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
To not have my data removed.
We should be extra careful when remove data and working with legacy tables.
One possible solution would be:
As an alternative, when executing the migration for deleting the data we should stop and make a warning if there's data on those tables.
Screenshots
If applicable, add screenshots to help explain your problem.
Stacktrace
If applicable, add the error stacktrace to help explain your problem.
Extra data (please complete the following information):
Additional context
This comes from #6178
See comment.