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

DPMMA-2566 Support old contactId type in point groups migration #13284

Conversation

patrykgruszka
Copy link
Member

Q A
Bug fix? (use the a.b branch) [ Y ]
New feature/enhancement? (use the a.x branch) [ N ]
Deprecations? [ N ]
BC breaks? (use the c.x branch) [ N ]
Automated tests included? [ N ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #13282

Description:

This PR fixes an issue with migrating point groups on databases with leads.id type INT.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Run ddev exec php bin/console doctrine:migrations:migrate

If you have already executed this migration before the fix, you will need to run the --down procedure first:
ddev exec php bin/console doctrine:migration:execute 'Mautic\Migrations\Version20230621074925' --down

@patrykgruszka patrykgruszka added bug Issues or PR's relating to bugs db-migrations code-review-needed PR's that require a code review before merging ready-to-test PR's that are ready to test labels Jan 30, 2024
@escopecz escopecz added this to the 5.0.3 milestone Jan 30, 2024
@escopecz escopecz self-requested a review January 30, 2024 11:35
Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

The code seem correct for me. I tested on the database which is already using bigints but it went well:

www-data@76d84b926e86:~/html$ bin/console doctrine:migration:execute 'Mautic\Migrations\Version20230621074925' --down

 WARNING! You are about to execute a migration in database "db" that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
 > 

[notice] Executing Mautic\Migrations\Version20230621074925 down
[notice] finished in 607.3ms, used 78.5M memory, 1 migrations executed, 10 sql queries

www-data@76d84b926e86:~/html$ bin/console doctrine:migration:execute 'Mautic\Migrations\Version20230621074925' --up  

 WARNING! You are about to execute a migration in database "db" that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
 > 

[notice] Executing Mautic\Migrations\Version20230621074925 up
[notice] finished in 459.2ms, used 76.5M memory, 1 migrations executed, 10 sql queries

It should work well for the pre-Mautic3 schemas too.

Thank you! 👍

@escopecz escopecz merged commit 1244995 into mautic:5.0 Jan 30, 2024
14 checks passed
@escopecz escopecz added code-review-passed PRs which have passed code review and removed code-review-needed PR's that require a code review before merging ready-to-test PR's that are ready to test labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs code-review-passed PRs which have passed code review db-migrations
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants