PhoenixKit.Migrations.Postgres.V09 (phoenix_kit v1.5.1)

View Source

PhoenixKit V09 Migration: Email Blocklist Support

This migration adds the email blocklist functionality to the email tracking system, allowing management of blocked email addresses for rate limiting and spam prevention.

Changes

Email Blocklist System

  • Adds phoenix_kit_email_blocklist table for blocked email addresses
  • Creates indexes for efficient blocklist queries
  • Supports temporary and permanent blocks with expiration
  • Provides audit trail for block management

New Features

  • Blocklist Management: Store blocked email addresses with reasons
  • Expiration Support: Temporary blocks with automatic expiration
  • User Tracking: Track which user added the block
  • Audit Trail: Complete history of block additions and removals
  • Performance Optimized: Efficient indexes for fast lookups

PostgreSQL Support

  • Supports PostgreSQL prefix for schema isolation
  • Optimized indexes for email lookup and expiration queries
  • Unique constraint to prevent duplicate blocks

Summary

Functions

Rollback the V09 migration.

Run the V09 migration to add email blocklist support.

Functions

down(opts)

Rollback the V09 migration.

up(opts)

Run the V09 migration to add email blocklist support.