# `PhoenixKit.Migrations.Postgres.V15`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.111/lib/phoenix_kit/migrations/postgres/v15.ex#L1)

PhoenixKit V15 Migration: Email Templates System

This migration introduces a comprehensive email templates management system
that allows storing, managing and using email templates through the admin interface.

## Changes

### Email Templates System
- Adds phoenix_kit_email_templates table for template storage and management
- Supports template variables with {{variable}} syntax
- Includes template categories (system, marketing, transactional)
- Template versioning and usage tracking
- Integration with existing email logging system

### New Tables
- **phoenix_kit_email_templates**: Template storage with metadata, variables, and usage analytics

## PostgreSQL Support
- Supports PostgreSQL prefix for schema isolation
- Optimized indexes for performance
- JSONB fields for flexible metadata and variables storage

# `down`

Rollback the V15 migration.

# `up`

Run the V15 migration to add email templates system.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
