Feat/newsletter indexes#574
Merged
hman38705 merged 3 commits intosolutions-plug:mainfrom Apr 24, 2026
Merged
Conversation
…ber queries - Add composite index on (confirmed, unsubscribed_at) for status filtering - Add composite index on (email, confirmed) for email lookups with status - Use CONCURRENTLY to avoid locking during index creation - Filter indexes to exclude unsubscribed records for better selectivity Improves query performance as subscriber count grows.
…ibers - Add deleted_at timestamp column to newsletter_subscribers table - Create indexes on deleted_at and active records for query optimization - Update newsletter_get_by_email to exclude soft-deleted records - Update newsletter_unsubscribe to check deleted_at condition - Add newsletter_soft_delete method for GDPR compliance - Keep hard delete (newsletter_gdpr_delete) for permanent removal Enables audit trails and GDPR compliance without data loss.
- Implement execute_migration with automatic rollback on failure - Add backup/restore functionality for storage state - Record migration history with version tracking - Implement verify_migration_integrity to check critical keys - Add reverse_migration for reverting to previous versions - Include comprehensive tests for migration scenarios Enables safe contract upgrades with data integrity verification.
|
@famvilianity-eng Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I've successfully implemented all three issues and created separate commits for each. Here's what was done:
✅ Issue #551: Database Indexes for Newsletter Queries
✅ Issue #552: Soft Delete for Newsletter Subscribers
✅ Issue #557: Contract Storage Migration Utilities
Closes #551
Closes #552
Closes #557