v1.4.0
Search…
⌃K
Links
✍

First/Last name

This recipe splits user.name into user.first_name and user.last_name.

How to use

Note: this has been rebased on the latest main branch and might not work properly on v1.3.0 and below. However, you should be able to work out how to apply it based on the diffs.
Also note that this recipe modifies an existing migration that may have been migrated in your project already.
If your project is in production you'll have to undo that migration change and create a new migration that removes the name field and adds first_name and last_name fields. For local projects, you can just run mix ecto.reset.

New projects

You can choose to check out the branch or cherry pick it.
git clone https://github.com/petalframework/petal_pro.git
cd petal_pro
git checkout recipes/first-name-last-name

Cherry pick

Follow the cherry-pick instructions with the branch recipes/first-name-last-name.
​
Last modified 3mo ago