Project

Profile

Help

Issue #3053

closed

pclean does not remove migrations in the pulp_app or plugin projects

Added by dkliban@redhat.com over 6 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

pclean leaves behind migrations and then migrates the database. As a result the database can end up in a strange state after running pclean.

Actions #1

Updated by bmbouter over 6 years ago

I ran into this and I had to manually delete the migrations directories before running pclean.

Actions #2

Updated by amacdona@redhat.com over 6 years ago

pclean doesn't makemigrations, that is done by Ansible at install time[0], 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.

[0]: https://github.com/pulp/devel/pull/91/files#diff-c674e6be1d4fd8bed7f77bad58146d18R106

Actions #3

Updated by daviddavis over 6 years ago

I concur with @asmacdona. I don't think we should update our aliases since we should be checking in migrations soon for the next major release of Pulp.

Actions #4

Updated by amacdona@redhat.com over 6 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
Actions #5

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #6

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)

Also available in: Atom PDF