Skip to content

Fixing warn modlog_constraint migration#6462

Open
dessalines wants to merge 3 commits intomainfrom
fix_modlog_constraint_migration
Open

Fixing warn modlog_constraint migration#6462
dessalines wants to merge 3 commits intomainfrom
fix_modlog_constraint_migration

Conversation

@dessalines
Copy link
Copy Markdown
Member

  • This failed on lemmy.ml prod data
  • Must have been copied from the wrong place.

- This failed on lemmy.ml prod data
@Nutomic
Copy link
Copy Markdown
Member

Nutomic commented Apr 21, 2026

Looks like you are basically reverting the change from #6360. I suppose you need to edit the migration and set these columns where they are missing.

@dessalines
Copy link
Copy Markdown
Member Author

dessalines commented Apr 21, 2026

These are really difficult to discover where there's issues with prod data, so I'm going to first get through the migrations, then try to fix this constraint with a new migration.

@dessalines dessalines marked this pull request as draft April 21, 2026 13:06
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Undoing the changes, here (IE using the current modlog checks), and adding a migration later to fix the broken rows.

@dessalines
Copy link
Copy Markdown
Member Author

Verified that this migration is working with prod data.

@dessalines dessalines marked this pull request as ready for review April 22, 2026 02:45
FROM
post p
WHERE
target_post_id = p.id;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Once its working, you can add these updates to the existing migration and get rid of this new migration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This one I'd prefer to keep as a separate migration, because

  • It doesn't have to do with adding the modlog warnings, and
  • because its easier to fix if its its own specific migration. It was really difficult to do this without going through every type of modlog action, so its nice to have an up / down for this one specifically.

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.

2 participants