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

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

# `down`

Rollback the V10 migration.

# `up`

Run the V10 migration to add user registration analytics.

---

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