Conversation
Missing revisions cause the dump to not restore!
|
Cleaning up revisions before dumping using |
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a management command to load initial data by wiping out existing data in several models and then reloading from a fixture to address issues with dumpdata not restoring revisions.
- Clears existing data in models including Site, Page, Permission, Group, and ContentType.
- Calls the loaddata command to repopulate the database with initial data.
Files not reviewed (1)
- dumpdata.sh: Language not supported
| ContentType.objects.all().delete() | ||
|
|
There was a problem hiding this comment.
Deleting all ContentType objects may remove essential system metadata that Django uses for content type management, potentially causing downstream issues. Consider targeting only specific ContentType objects that need to be reset or ensure a mechanism to properly regenerate them.
| ContentType.objects.all().delete() | |
| ContentType.objects.filter(model__in=['page', 'site', 'permission', 'group']).delete() |
Missing revisions cause the dump to not restore!