LogoLogo
v1.5.0
v1.5.0
  • 🌸What is Petal Pro?
  • πŸ’‘Changelog
  • ⏫Upgrade guide
  • Guides
    • πŸš€Creating a web app from start to finish
  • πŸ‘©β€πŸ³Recipes
    • πŸ’How to apply a recipe with git cherry pick
    • #️⃣UUIDs
    • ✍️First/Last name
    • πŸ“¦NPM packages
    • πŸ—ΊοΈGoogle Maps
  • Fundamentals
    • πŸ’ΏInstallation
    • πŸ“‚Folder structure
    • πŸ—ƒοΈIncluded Pages
    • πŸ˜€Users & Authentication
    • 🏒Organizations & Multitenancy
    • 🧊Components
    • ⬛Dark mode
    • 🎨Branding
    • 🌱Seeding
    • πŸ“„Layouts & Menus
    • πŸ› οΈBackground Tasks and Jobs
    • πŸ”§Util & Helpers
    • πŸ“§Emails
    • πŸͺJavascript Hooks
    • πŸ“šExtra Hex Libraries
    • πŸ—οΈGenerators & Page Builder
    • πŸ—£οΈTranslations
    • πŸ–οΈContributing
    • πŸ›«Deployment
    • πŸ›‘οΈTesting
Powered by GitBook
On this page

Was this helpful?

  1. Recipes

UUIDs

PreviousHow to apply a recipe with git cherry pickNextFirst/Last name

Last updated 2 years ago

Was this helpful?

We have a branch called recipes/uuid that converts all "ids" to use the UUID6 type. We chose UUID6 as it allows for ordering due to its sequential nature.

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.

New projects

You can either check out the branch and work off that or follow the with the branch recipes/npm.

git clone https://github.com/petalframework/petal_pro.git
cd petal_pro
git checkout recipes/uuid

Once applied, you might need to run mix ecto.reset if you had already migrated the database previously.

Existing projects

If you already have a project in production then it will be a bit more difficult to update to use UUIDs. has an example of a migration.

πŸ‘©β€πŸ³
#️⃣
cherry-pick instructions
This blog post