Closed MtDalPizzol closed 1 year ago
I need to add a required phone column to the users table.
required phone column
users table
So, a made and ran the migration and also added a field for the phone on the user blueprint.
migration
field
The problem is that the form for editing the user is not the same as the form for creating the user.
editing
creating
When creating the user, there's no phone field and I get a database error since the column is required.
database error
When editing a user everything is fine.
users
user blueprint
No response
Environment Application Name: Clube Amo Meu Pet Laravel Version: 9.45.1 PHP Version: 8.1.13 Composer Version: 2.5.1 Environment: local Debug Mode: ENABLED URL: statamic.amomeupet.test Maintenance Mode: OFF Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED Drivers Broadcasting: pusher Cache: statamic Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file Statamic Addons: 2 Antlers: regex Stache Watcher: Enabled Static Caching: Disabled Version: 3.4.7 PRO Statamic Addons doublethreedigital/runway: dev-main statamic/eloquent-driver: 1.1.2
Fresh statamic/statamic site via CLI
None
Duplicate of https://github.com/statamic/cms/issues/7925 (happens without database users)
Bug description
I need to add a
required phone column
to theusers table
.So, a made and ran the
migration
and also added afield
for the phone on the user blueprint.The problem is that the form for
editing
the user is not the same as the form forcreating
the user.When creating the user, there's no phone field and I get a
database error
since the column is required.When editing a user everything is fine.
How to reproduce
migration
that adds a NON NULLABLE column to theusers
tableuser blueprint
adding a field for that columnLogs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
No response