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

Collection fix via data migration #6721

Merged
merged 4 commits into from
May 19, 2021
Merged

Conversation

KalobTaulien
Copy link
Contributor

@KalobTaulien KalobTaulien commented May 19, 2021

Closes #6720
Related PRs/issues #6702

Note: This migration needs to be run in production before #6702 can be applied. #6702 will fail if the watail migrations are run before the migration in this PR.

Steps to test:

  1. Checkout this branch
  2. Pull down the staging database
  3. Run inv manage clean_collections

All migrations should run. And if you go to http://localhost:8000/cms/collections/ you should see our collections show up the way they're supposed to.

Let's also double check that the Collections that end up being deleted in the 0008 migration are the in fact factory collections, and not actually being used. As far as I was able to tell today, this is wiping out unused collections from staging's database.

@KalobTaulien KalobTaulien requested a review from Pomax May 19, 2021 16:37
@mofodevops mofodevops temporarily deployed to foundation-s-6720-multi-udxv0h May 19, 2021 16:37 Inactive
@mofodevops mofodevops temporarily deployed to foundation-s-6720-multi-udxv0h May 19, 2021 20:21 Inactive
@KalobTaulien KalobTaulien requested a review from Pomax May 19, 2021 20:22

# Let's confirm root is ID #1, as it should be just to be safe.
if root.id != 1:
print("Incorrect root Collection ID. Stopping this script to prevent any mistakes")
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

@Pomax Pomax temporarily deployed to foundation-s-6720-multi-udxv0h May 19, 2021 21:02 Inactive
@MozillaFoundation MozillaFoundation deleted a comment from github-actions bot May 19, 2021
@MozillaFoundation MozillaFoundation deleted a comment from github-actions bot May 19, 2021
@MozillaFoundation MozillaFoundation deleted a comment from github-actions bot May 19, 2021
@MozillaFoundation MozillaFoundation deleted a comment from github-actions bot May 19, 2021
@Pomax Pomax merged commit 4965796 into master May 19, 2021
@Pomax Pomax deleted the 6720-multiple-root-collection-fix branch May 19, 2021 21:09
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.

Fix multiple root Collections
3 participants