Custom Fields v3 requires:
composer require relaticle/custom-fields:"^3.0" -W
php artisan migrate
php artisan custom-fields:upgrade
The upgrade command automatically handles data migrations for phone fields, email fields, and lookup fields.
| Option | Description |
|---|---|
--dry-run | Show what would be migrated without making changes |
--force | Run without confirmation prompts |
--skip= | Skip specific steps (comma-separated) |
Skippable steps: lookup-fields, email-format, phone-format, validate-schema, clear-caches
# Preview changes without applying them
php artisan custom-fields:upgrade --dry-run
# Run in CI/CD without prompts
php artisan custom-fields:upgrade --force
# Skip specific steps
php artisan custom-fields:upgrade --skip=clear-caches
php artisan custom-fields:upgrade --skip=email-format,phone-format
Custom Fields v3 requires Filament 5. If you're still on Filament 4, upgrade Filament first following the Filament upgrade guide.
The lookup_type setting has been removed from field types that don't support entity lookups. The upgrade command migrates affected fields automatically.
Affected field types: Text, Textarea, Number, Date, DateTime, Email, Phone, and other non-relational types.
If you were using lookup_type on these fields, they will be converted to standard fields.
Phone fields now store values as JSON arrays of E.164 strings (supporting multiple phone numbers):
// v2 format (single string in string_value column)
"+11234567890"
// v3 format (JSON array in json_value column)
["+11234567890"]
The upgrade command migrates existing phone values automatically.
Email fields now support multiple values stored as JSON:
// v2 format (string)
"user@example.com"
// v3 format (JSON array)
["user@example.com"]
The upgrade command migrates existing email values automatically.
v3 adds propaganistas/laravel-phone for phone validation. This is installed automatically with composer.
If you prefer manual control over the upgrade process:
composer require relaticle/custom-fields:"^3.0" -W
php artisan migrate
The upgrade command performs these steps:
php artisan custom-fields:upgrade
You can skip specific steps if needed:
# Run everything except cache clearing
php artisan custom-fields:upgrade --skip=clear-caches
# Run only lookup field migration
php artisan custom-fields:upgrade --skip=email-format,phone-format,validate-schema,clear-caches
php artisan cache:clear
php artisan config:clear
php artisan view:clear
php artisan filament:cache-components
Clear your views and Filament component cache:
php artisan view:clear
php artisan filament:cache-components
Check for invalid phone numbers in your database:
SELECT * FROM custom_field_values
WHERE custom_field_id IN (
SELECT id FROM custom_fields WHERE type = 'phone'
) AND text_value IS NOT NULL;
Invalid numbers are preserved as-is with a default country code.
lookup_type on non-record fields, remove those references. Only the record field type supports lookups in v3.composer require relaticle/custom-fields:"^3.0" -Wphp artisan migratephp artisan custom-fields:upgrade (use --dry-run first to preview)