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

Migration Class Refactor and Column Existence Check #358

Merged
merged 4 commits into from
Sep 2, 2024

Conversation

anilkumarthakur60
Copy link
Contributor

This pull request includes significant updates to our migration scripts, focusing on enhancing maintainability and ensuring robust operations. The primary changes are:

  • Refactor to New Migration Class Style: Transitioned migration classes to use anonymous classes extending Migration.
  • Enhanced Column Existence Checks: Implemented checks to ensure columns are only added or dropped if they do not already exist or exist, respectively. it also fixes the failing checks in ci with running the migration after publishing when vendor migration file

@selfsimilar
Copy link
Contributor

I would like to see this merged since I manually added the alt column years ago, and the only way to upgrade to to 6.x version is to add a migration to drop my custom alt column first. But if I want to save any alt column data I'll have to also export and then import that column, too. Conditionally adding/removing columns seems like best practice.

@frasmage
Copy link
Collaborator

frasmage commented Sep 2, 2024

Hi there, sorry for the delay in getting to this. These changes all make sense. Thank you for your contribution!

@frasmage frasmage merged commit a2c3308 into plank:master Sep 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants