#οΈβ£UUIDs
How to use
New projects
git clone https://github.com/petalframework/petal_pro.git
cd petal_pro
git checkout recipes/uuidExisting projects
Last updated
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.
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.
You can either check out the branch and work off that or follow the cherry-pick instructions with the branch recipes/npm.
git clone https://github.com/petalframework/petal_pro.git
cd petal_pro
git checkout recipes/uuidOnce applied, you might need to run mix ecto.reset if you had already migrated the database previously.
If you already have a project in production then it will be a bit more difficult to update to use UUIDs. This blog post has an example of a migration.
Last updated
Was this helpful?
Was this helpful?
