pclean does not remove migrations in the pulp_app or plugin projects
pclean leaves behind migrations and then migrates the database. As a result the database can end up in a strange state after running pclean.
#2 Updated by email@example.com about 2 years ago
pclean doesn't makemigrations, that is done by Ansible at install time0, and I'd like to keep pclean out of the business of generating migrations.
My thinking is that migrations are generated, but they are still code, and the developers should be aware of them. Later, when we have committed the migrations, developers will be expected to commit new migrations alongside their changes to the data layer, so I think it would be good to get into the habit of making new migrations when you change the data layer.
I wouldn't mind a new dev alias to remove and recreate migrations, though it might get tricky if we want to include plugin migrations.
#4 Updated by firstname.lastname@example.org about 2 years ago
- Status changed from NEW to CLOSED - WONTFIX
Closing as WONTFIX since this is a temporary problem until we commit the migrations.
The problem occurs because migrations from other branches are not removed (because they aren't tracked in git).
Workaround is to remove and remake the migrations.
rm -rf ~/3dev/pulp/platform/pulpcore/app/migrations
You may also need to remove and remake the migrations for the plugins:
rm -rf ~/3dev/pulp_file/pulp_file/app/migrations/
After migrations are removed, remake them all before you try to migrate:
pulp-manager makemigrations pulp_app pulp-manager makemigrations pulp_<each_plugin> pclean
Please register to edit this issue