Search documentation of phoenix_kit

# PhoenixKit.Migrations.Postgres.V10 (phoenix_kit v1.7.87)

Copy Markdown View Source

PhoenixKit V10 Migration: User Registration Analytics

This migration adds user registration analytics functionality to track geographical and technical information about user registrations for statistics and insights.

## Changes

### User Analytics Columns

- Adds registration analytics columns to phoenix_kit_users table
- Creates indexes for efficient analytics queries
- Supports IP address tracking with privacy-focused design
- Provides geographical data (country, region, city)

### New Features

- Registration Analytics: Track IP and location data directly on user records
- Privacy Focused: Designed for easy data purging and compliance
- Performance Optimized: Efficient indexes for analytics queries
- Simplified Data Model: Analytics data stored directly with user records
- Audit Trail: Registration analytics linked to user accounts

## PostgreSQL Support

- Supports PostgreSQL prefix for schema isolation
- Uses string type for IP address storage (IPv4/IPv6 compatible)
- Optimized indexes for common analytics queries
- No additional foreign key constraints needed

## Summary

### Functions

down(opts)

Rollback the V10 migration.

up(opts)

Run the V10 migration to add user registration analytics.

## Functions

# down(opts)

Rollback the V10 migration.

# up(opts)

Run the V10 migration to add user registration analytics.