UUIDs are a popular alternative to auto-incremental integer primary keys. 1 2create_table :users, id: :uuid do |t| 3 t.string :name 4end 5 Copy Notice that id: :uuid is passed to create_table. This is all we need to do to have UUID as primary key for users. Now, if an application is designed to use UUID instead of Integer, then chances are that new tables too would use UUID as primary key. And it
![Rails 5 provides config to use UUID as primary key](https://cdn-ak-scissors.b.st-hatena.com/image/square/df7dcf3e382d2d4b018ba79fc6642260e3fa7070/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fdpc4i4bdx%2Fimage%2Fupload%2Fbigbinary_blogs%2Fdefault_blog_image.png)