Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean out old migration code and drupal id migration field. #4340

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

frjo
Copy link
Member

@frjo frjo commented Jan 14, 2025

This is code used by OTF when migrating from the old Drupal based system back in 2018.

@frjo
Copy link
Member Author

frjo commented Jan 14, 2025

@theskumar We now have one migration that adds the drupal_id and then one that removes it.

Is that just how it is or should we clean up the old migrations?

@frjo
Copy link
Member Author

frjo commented Jan 14, 2025

@wes-otf I do not see any benefit to OTF to keep these around, do you?

With all the cleaning of the code base you and others have made I remembered these.

@theskumar
Copy link
Member

Is that just how it is or should we clean up the old migrations?

Yes. for now that's how it should be. squashing/removing migration will break the dependency graph for the migration files.

This blog post has some guidance on how to do it properly: https://jacklinke.com/squashing-django-migrations-the-easy-way. I have not tried it myself, but seems to me the right way to do it. TLDR; it's a long process.

@frjo frjo added Type: Maintenance Type: Patch Mini change, used in release drafter labels Jan 21, 2025
Copy link
Contributor

@wes-otf wes-otf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see need for anything drupal related in the future, would be sweet to be able to clean up these migrations too

@frjo frjo force-pushed the maintenance/clean-out-old-migration-code branch from b3ee7ca to 3c53f70 Compare January 22, 2025 08:17
@frjo frjo merged commit 09aac2c into main Jan 22, 2025
7 checks passed
sandeepsajan0 pushed a commit that referenced this pull request Jan 26, 2025
This is code used by OTF when migrating from the old Drupal based system
back in 2018.
@frjo frjo deleted the maintenance/clean-out-old-migration-code branch March 11, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Type: Patch Mini change, used in release drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants