hasgeek/lastuser

Add UUID columns to substitute userid columns

Closed this issue · 0 comments

jace commented

In the User, Organization, Team and OldUserId models, add a uuid column of type UUID. These should be UUID1MC values and not a decoded version of the existing buid-based userid columns. Values for existing rows should be generated using Coaster's uuid1mc_from_timestamp function with the created_at column. The OldUserId table should copy UUID values from the User table.

All resources should return this UUID alongside the userid and buid keys.

This column is the first step towards (a) switching from BUID to UUID for cross-app foreign keys (better db performance storing values as UUID in the database) and (b) switching from UUID4 to UUID1MC (better db index performance).